I imported my blog from jekyll and my jekyll highlight tags were converted to this {{< highlight scss >}}`` kind of short tags. Problem now is this wraps code in just quotes “” instead of pre
and code
tags. I’m eventually going to be using prism and wrapping code tags in the GitHub format with triple back tics and language name but I need this for backward compatibility for old posts I don’t have time to address yet
I figured this is because I installed pygments in a virtual env which I didn’t activate. I activated it and it worked okay
Now my question would be. Could I have all those shortcodes just compile to something for prism instead of relying on pygments
Not sure what prism is, but
- Hugo supports one “build time” code higlighter: Pygments
- You could alternatively use a client side highlighter
Prism is a client-side highlighter http://prismjs.com . But I see it has to be one or the other. The build time shortcode can’t work for client-side