summaryrefslogtreecommitdiffhomepage
path: root/themes/docsy/layouts/shortcodes/readfile.md
blob: 117c7e8706c730334394135141c4b0e0104ca248 (plain)
1
2
3
4
5
6
7
8
{{$file := .Get "file"}}
{{- if eq (.Get "markdown") "true" -}}
{{- $file  | readFile | markdownify -}}
{{- else if  (.Get "highlight") -}}
{{-  highlight ($file  | readFile) (.Get "highlight") "" -}}
{{- else -}}
{{ $file  | readFile | safeHTML }}
{{- end -}}