{{$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 -}}