ctrlz.es/themes/hugo-bearcub/layouts/shortcodes/highlight.html

5 lines
449 B
HTML
Raw Permalink Normal View History

2024-01-08 09:51:11 +01:00
<!-- https://github.com/jmooring/hugo-testing/blob/hugo-forum-topic-40998/layouts/_default/_markup/render-codeblock-katex.html -->
{{ .Page.Store.Set "hasCodeBlock" true }}
<!-- https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/shortcodes/highlight.html -->
{{ if len .Params | eq 2 }}{{ highlight (trim .InnerDeindent "\n\r") (.Get 0) (.Get 1) }}{{ else }}{{ highlight (trim .InnerDeindent "\n\r") (.Get 0) "" }}{{ end }}