Hello,
I have a website running Hugo, and in the past, I generated a CSS file using the command:
hugo gen chromastyles --style=monokai > syntax.css
which I have been using until now. I don’t recall what led me to that decision, but I didn’t alter the CSS file in any way.
Today, while reading the Hugo documentation, I noticed that the syntax highlighting style can be also set easily with a simple option in hugo.toml
, like this:
[markup]
[markup.highlight]
style = "monokai"
This would save me from using a custom CSS file. But I’m wondering about the advantage of having a separate CSS file, aside from the fact that it adds classes I can modify. If I’m perfectly fine with the default color themes. In this case, can I simply use the hugo.toml configuration and skip the custom stylesheet?