I’m attempting to add Prism syntax highlighting as an option for a theme I’m building. But how would I go about making the layouts/_default/_markup/render-codeblock.html optional?
My first thought was to enclose my custom code in the render-codeblock.html file within a conditional if e.g.:
{{ if eq .Site.Params.prism true -}}
custom Prism code
{{ end -}}
My (incorrect) assumption was that, if ‘empty’, Hugo would revert to its default highlighting.
But I see now that Hugo still looks to the file for a highlighting config even if empty. How do I replicate the default Chroma configuration inside my custom render-codeblock.html for when Prism is disabled?