Code block syntax highlighting using built-in functions #362
Replies: 2 comments 2 replies
-
Another approach can maybe be this interesting project: https://torchlight.dev The focus and diff functions seem to be very nice. |
Beta Was this translation helpful? Give feedback.
-
It's almost been a year and nothing has been decided on this. torchlight.dev needs all new setup and highlight.js doesn't support everything needed such as line number. Hugo has built in highlighting that runs in Go (Fast) and runs at the time of creation instead of on the browser like highlight.js. It's also would be the most idiomatic way of dealing with it as it's built into the SSG that we are using. Would now be the right time to remove that highlight.js from the project? |
Beta Was this translation helpful? Give feedback.
-
Related to issue #359.
Currently, the
highlight.js
library is used for syntax highlighting. Unfortunately, this library has no support for displaying line numbers.As an alternative,
highlight.js
can be replaced by the syntax highlighting built-in functions provided by the Goldmark markdown parser.https://gohugo.io/content-management/syntax-highlighting/
Beta Was this translation helpful? Give feedback.
All reactions