diff options
Diffstat (limited to 'exampleSite/layouts/shortcodes/readfile.html')
-rw-r--r-- | exampleSite/layouts/shortcodes/readfile.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/exampleSite/layouts/shortcodes/readfile.html b/exampleSite/layouts/shortcodes/readfile.html new file mode 100644 index 0000000..36400ac --- /dev/null +++ b/exampleSite/layouts/shortcodes/readfile.html @@ -0,0 +1,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 -}}
\ No newline at end of file |