queensferryme / hugo-theme-texify

A minimal, latex-style hugo theme for personal blogging
https://texify.qufy.me
MIT License
139 stars 47 forks source link

Support for syntax highlighting #26

Closed assayire closed 1 year ago

assayire commented 2 years ago

Does this theme support syntax highlighting in code blocks? If so, how do I enable it? Currently, the code in code blocks are all just red color.

Thanks.

queensferryme commented 2 years ago

Hi, syntax highlighting works well for me (e.g. blog). Could you post your code blocks so that I can help identify the problem?

Hint, maybe you should look at config.toml:

[markup.highlight]
style = "emacs" # syntax highlight style, see https://xyproto.github.io/splash/docs/
assayire commented 1 year ago

Ahh I see now.

Added this to turn on the magic. Works fine now.

[markup]
defaultMarkdownHandler = "goldmark"

[markup.goldmark.renderer]
unsafe = true # enable html in markdown

[markup.highlight]
style = "emacs"