hugo-theme-hilfe/layouts/shortcodes/include.html
2020-04-30 20:55:53 +02:00

8 lines
294 B
HTML

{{$file := .Get "file"}}
{{- if eq (.Get "markdown") "true" -}}
{{- $file | readFile | markdownify -}}
{{- else if (.Get "language") -}}
{{- highlight ($file | readFile) (.Get "language") (default "linenos=table" (.Get "options")) -}}
{{- else -}}
{{ $file | readFile | safeHTML }}
{{- end -}}