I expected CSS classes to get generated for the code block under “Monospace / Preformatted” section. Also, if I choose another theme e.g. kiera I can perfectly see classes like chroma, nb, c1 etc. inserted in the said code block.
Umm, no. If we have set pygmentsUseClasses = true in config.toml then Hugo generates HTML code embedded with CSS classes.
Then to use those classes we need to generate the stylesheet using hugo gen chromastyles. But since hugo is not generating CSS classes for AllinOne theme (for Kiera it did) there’s no use of generated CSS stylesheet.
Please feel free to correct me if I am mixing up. Hugo beginner here!
and then <link rel="stylesheet" type="text/css" href="chroma.css">
If that works for you, that’s ok. Keep in mind though that modifying the theme directly might not be the best idea if you have it as a submodule. (But that I suppose is off-topic from the original question)