hugo-theme-hilfe/layouts/shortcodes/include.html

11 lines
338 B
HTML
Raw Normal View History

{{ $file := .Get "file" }}
<div class="gdoc-include">
2020-04-30 15:37:27 +02:00
{{- if eq (.Get "markdown") "true" -}}
{{- $file | readFile | $.Page.RenderString -}}
2020-04-30 15:37:27 +02:00
{{- else if (.Get "language") -}}
{{- highlight ($file | readFile) (.Get "language") (default "linenos=table" (.Get "options")) -}}
{{- else -}}
{{ $file | readFile | safeHTML }}
2020-04-30 20:55:53 +02:00
{{- end -}}
</div>