成为我们的资助者或赞助商,以支持我们的工作。
HB 提供了数十个语法高亮显示模块,本文将列出所有支持的样式。
你需要禁用 markup.highlight.noClasses
以使用该模块。
hugo.toml
1[markup]
2 [markup.highlight]
3 noClasses = false
hugo.yaml
1markup:
2 highlight:
3 noClasses: false
hugo.json
1{
2 "markup": {
3 "highlight": {
4 "noClasses": false
5 }
6 }
7}
模块路径不包含下划线(_
),你需要将其替换为破折号(-
),比如 algol_nu
应该替换为 algol-nu
。
Module | Version |
---|---|
github.com/hbstack/syntax-highlighting/styles/abap | |
github.com/hbstack/syntax-highlighting/styles/algol | |
github.com/hbstack/syntax-highlighting/styles/algol-nu | |
github.com/hbstack/syntax-highlighting/styles/arduino | |
github.com/hbstack/syntax-highlighting/styles/autumn | |
github.com/hbstack/syntax-highlighting/styles/average | |
github.com/hbstack/syntax-highlighting/styles/base16-snazzy | |
github.com/hbstack/syntax-highlighting/styles/borland | |
github.com/hbstack/syntax-highlighting/styles/bw | |
github.com/hbstack/syntax-highlighting/styles/catppuccin-frappe | |
github.com/hbstack/syntax-highlighting/styles/catppuccin-latte | |
github.com/hbstack/syntax-highlighting/styles/catppuccin-macchiato | |
github.com/hbstack/syntax-highlighting/styles/catppuccin-mocha | |
github.com/hbstack/syntax-highlighting/styles/colorful | |
github.com/hbstack/syntax-highlighting/styles/doom-one | |
github.com/hbstack/syntax-highlighting/styles/doom-one2 | |
github.com/hbstack/syntax-highlighting/styles/dracula | |
github.com/hbstack/syntax-highlighting/styles/emacs | |
github.com/hbstack/syntax-highlighting/styles/friendly | |
github.com/hbstack/syntax-highlighting/styles/fruity | |
github.com/hbstack/syntax-highlighting/styles/github-dark | |
github.com/hbstack/syntax-highlighting/styles/github | |
github.com/hbstack/syntax-highlighting/styles/gruvbox-light | |
github.com/hbstack/syntax-highlighting/styles/gruvbox | |
github.com/hbstack/syntax-highlighting/styles/hr-high-contrast | |
github.com/hbstack/syntax-highlighting/styles/hrdark | |
github.com/hbstack/syntax-highlighting/styles/igor | |
github.com/hbstack/syntax-highlighting/styles/lovelace | |
github.com/hbstack/syntax-highlighting/styles/manni | |
github.com/hbstack/syntax-highlighting/styles/modus-operandi | |
github.com/hbstack/syntax-highlighting/styles/modus-vivendi | |
github.com/hbstack/syntax-highlighting/styles/monokai | |
github.com/hbstack/syntax-highlighting/styles/monokailight | |
github.com/hbstack/syntax-highlighting/styles/murphy | |
github.com/hbstack/syntax-highlighting/styles/native | |
github.com/hbstack/syntax-highlighting/styles/nord | |
github.com/hbstack/syntax-highlighting/styles/onedark | |
github.com/hbstack/syntax-highlighting/styles/onesenterprise | |
github.com/hbstack/syntax-highlighting/styles/paraiso-dark | |
github.com/hbstack/syntax-highlighting/styles/paraiso-light | |
github.com/hbstack/syntax-highlighting/styles/pastie | |
github.com/hbstack/syntax-highlighting/styles/perldoc | |
github.com/hbstack/syntax-highlighting/styles/pygments | |
github.com/hbstack/syntax-highlighting/styles/rainbow-dash | |
github.com/hbstack/syntax-highlighting/styles/rose-pine-dawn | |
github.com/hbstack/syntax-highlighting/styles/rose-pine-moon | |
github.com/hbstack/syntax-highlighting/styles/rose-pine | |
github.com/hbstack/syntax-highlighting/styles/rrt | |
github.com/hbstack/syntax-highlighting/styles/solarized-dark | |
github.com/hbstack/syntax-highlighting/styles/solarized-dark256 | |
github.com/hbstack/syntax-highlighting/styles/solarized-light | |
github.com/hbstack/syntax-highlighting/styles/swapoff | |
github.com/hbstack/syntax-highlighting/styles/tango | |
github.com/hbstack/syntax-highlighting/styles/trac | |
github.com/hbstack/syntax-highlighting/styles/vim | |
github.com/hbstack/syntax-highlighting/styles/vs | |
github.com/hbstack/syntax-highlighting/styles/vulcan | |
github.com/hbstack/syntax-highlighting/styles/witchhazel | |
github.com/hbstack/syntax-highlighting/styles/xcode-dark | |
github.com/hbstack/syntax-highlighting/styles/xcode |