Hugo在官方文档中 有 Pygments{python 写的}与Chroma{go 写的}(从0.30版本开始,集成了Chroma作为替代。)
<head>两种做法, 可看
具体看 http://note.qidong.name/2017/06/24/hugo-highlight/
我的 config.toml
pygmentsCodeFences = true
pygmentsCodefencesGuessSyntax = false
pygmentsStyle = "dracula"
pygmentsOptions = ['linenos']答: 在 theme 下 /casper-two/layouts/partials/head.html 模版上,加 css
<style>
div.highlight {
width:100%;
}
</style>答: 自定义css http://www.shawpo.me/post/hugo-markdown-code-style/
1. 第一
中间有东西的话
2. 第二
这个`2.`会变回`1.`
3. 第三
同上
的解析出现错误
错误用咧请看
中间有东西的话
这个2.会变回1.
同上
答: 不得已<b> *. </b> 代替吧