You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.
I'd like to use Pygments for server-side highlighting, but I can't seem to get it working properly. I set pygmentsUseClasses = true and pygmentsStyle = "monokai", but the style doesn't seem to be applied.
Here's some example code and a screenshot of the result:
I've poked around the theme and see that you're using Highlight.js, but since I'm not a web programmer I don't really know what to change to get Pygments to do its thing. Is Highlight.js baked into the theme that it would be impractical for me to try getting Pygments to work, or is there an easy solution that I'm not aware of?
The text was updated successfully, but these errors were encountered:
it's correct that Highlight.js is backed into the theme. Pygments should work out of the box but I guess that the styling of Pygments in Highlight.js interfere with each other which causes the unintended way syntax highlighting in the code above.
This department of Hugo got some traction in the last days. Chroma is a port of Pygments to Go which is not only faster but should work as a drop-in replacement due to the very similar design. There's already a pull request that will make it the default syntax highlighter.
As I expect that the use of Pygments / Chroma will increase, because no external dependencies are required anymore, it makes even more sense to make Highlight.js optional.
I see two ways to handle this:
Introduce a new option to enable Highlight.js (default is false).
Let users add the JS and CSS files for Highlight.js manually via the customJS and customCSS config options.
Note: both proposals introduce breaking changes that affect every user of this theme.
I'd like to use Pygments for server-side highlighting, but I can't seem to get it working properly. I set
pygmentsUseClasses = true
andpygmentsStyle = "monokai"
, but the style doesn't seem to be applied.Here's some example code and a screenshot of the result:
I've poked around the theme and see that you're using Highlight.js, but since I'm not a web programmer I don't really know what to change to get Pygments to do its thing. Is Highlight.js baked into the theme that it would be impractical for me to try getting Pygments to work, or is there an easy solution that I'm not aware of?
The text was updated successfully, but these errors were encountered: