blob: 5f80a2766f07dc197f701d5ab9571cc626b787d1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
{{$file := .Get "file"}}
{{$content := $file | readFile | replaceRE "^---[[:graph:][:space:]]*?---\n" "" }}
{{- if eq (.Get "markdown") "true" -}}
{{- $content | markdownify -}}
{{- else if (.Get "highlight") -}}
{{- highlight ($content) (.Get "highlight") "" -}}
{{- else -}}
{{ $content | safeHTML }}
{{- end -}}
|