mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-14 00:40:40 +00:00
9 lines
294 B
HTML
9 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 -}}
|