categories | tags | Aimee's Blog
Aimee's Study Notes

It is updated automatically after each commit to the org-notes repo. It was last updated on Mar 01, 2021 00:18 UTC.

This page was created/modified in commit ffafb8f "search & change tags" on 2020-12-06.
Markdown source of this page

Hugo Code Highlight

categories: hacking

tags: hugo css


Hugo uses default built-in code highlight. Change it from config.toml and (maybe) add your own syntax.css.


Disable the default

Add this code to the top level in your config.toml. Do not put it below [Params].

pygmentsUseClasses = true

Generate your syntax.css

Hugo’s doc: Generate Syntax Highlighter CSS

hugo gen chromastyles --style=monokai > syntax.css

Replace “monokai” with other names here.

Add the CSS file to the right place, for example,


and add the path to your header.html or head.html, where stylesheets are imported.

This site is generated with ox-hugo for Emacs/Org-mode + hugo-bare-min-theme [Aimee's Study Notes]