add include shortcode and doc

This commit is contained in:
Michael Barz 2020-04-30 15:37:27 +02:00
parent daa0d0744b
commit 5486f711f7
No known key found for this signature in database
GPG key ID: 8B36FAF20D80DB3F
4 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,8 @@
{{$file := .Get "file"}}
{{- if eq (.Get "markdown") "true" -}}
{{- $file | readFile | markdownify -}}
{{- else if (.Get "language") -}}
{{- highlight ($file | readFile) (.Get "language") (default "linenos=table" (.Get "options")) -}}
{{- else -}}
{{ $file | readFile | safeHTML }}
{{- end -}}