Welcome to mirror list, hosted at ThFree Co, Russian Federation.

readfile.html « shortcodes « layouts « exampleSite - github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 36400ac55dc3a745a8429041c3d6767a58acbcdb (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 -}}