Closed athul closed 4 years ago
I think https://pygments.org/ is a good solution. We use it in many Hugo themes. The config structure is also simple:
# Enable syntax highlighting.
pygmentsstyle = "solarized-light"
More options can be found here which we can implement: https://pygments.org/docs/styles/
EDIT: I have a WIP solution with this, will be sending a PR.
Chroma is Pygments in Go. So it has the same highlighting and all.
Hugo uses Chroma as its code highlighter; it is built in Go and is really, really fast – and for the most important parts compatible with Pygments we used before.
I too have a WIP 😅
Ah, okay. Wasn't aware :)
EDIT: I just realised you are talking about your own personal fork of zettel. My bad :)
Okay feel free to send the PR!
Adding Support for Syntax Highlighting would be much useful. I implemented one on my personal fork with chroma and it works perfectly. I also had an idea on customizing the colorschemes from the
zettel.toml
file, and found a rather crooked workaround with golang maps.This has to be finished with all the colorschemes of chroma. The current build works fine. Need some feedback for he above.
I'll send a PR soon