readfile.html (260B)
1 {{$file := .Get "file"}} 2 {{- if eq (.Get "markdown") "true" -}} 3 {{- $file | readFile | markdownify -}} 4 {{- else if (.Get "highlight") -}} 5 {{- highlight ($file | readFile) (.Get "highlight") "" -}} 6 {{- else -}} 7 {{ $file | readFile | safeHTML }} 8 {{- end -}}