Create a custom code highlight for Hugo

This article explains how to change the code highlight for a custom hugo website theme. Suppose that the website is based on the PaperMod theme, and the source code colors needs to be customized. In the PaperMod theme, the highlight.js library is used to provide different styles for each defined language. This file is located in: . └── themes └── PaperMod └── assets └── js └── highlight.min.js Now, update the minified library in the custom theme to apply the changes, and change the css style for the target language:...

January 9, 2023 · 2 min