mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Merge commit 'b9bd35d72e14932fb6588ff62b90cddef0a060fc' as 'docs'
This commit is contained in:
8
docs/layouts/shortcodes/readfile.html
Normal file
8
docs/layouts/shortcodes/readfile.html
Normal file
@@ -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 -}}
|
Reference in New Issue
Block a user