aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes/highlight.html
blob: 6c86ca8d5274b946dba5b5d431260e90f90a8f07 (plain)
1
2
3
4
5
<!-- 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 }}