hugo-theme-hilfe/layouts/shortcodes/include.html
2021-02-21 14:27:54 +01:00

10 lines
338 B
HTML

{{ $file := .Get "file" }}
<div class="gdoc-include">
{{- if eq (.Get "markdown") "true" -}}
{{- $file | readFile | $.Page.RenderString -}}
{{- else if (.Get "language") -}}
{{- highlight ($file | readFile) (.Get "language") (default "linenos=table" (.Get "options")) -}}
{{- else -}}
{{ $file | readFile | safeHTML }}
{{- end -}}
</div>