cocoa-eh-hugo-theme
cocoa-eh-hugo-theme copied to clipboard
Fix syntax highlighting issues with Chroma
Minor changes along the lines of https://themes.gohugo.io/beautifulhugo/ for supporting both highlight.js
(theme-default) and chroma
(hugo-native) highlighting solutions:
- To use
highlightling.js
, use these settings withinconfig.toml
:
pygmentsCodeFences = false
pygmentsUseClasses = false
[params]
highlightjs = true
- To rely on Chroma instead:
pygmentsCodeFences = true
pygmentsUseClasses = true
[params]
highlightjs = false
Using the new server side syntax highilighting provided by Chroma requires generating an additional CSS file. For example, for styling according to the trac
theme, one would run:
hugo gen chromastyles --style=trac > static/css/syntax.css
- The
main.css
file has been changed to properly display the horizontal scrollbar in code fences when using Chroma for syntax highlighting.- The README has been updated to point to the contributing guidelines.