mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-12-04 21:23:07 +00:00
15 lines
No EOL
500 B
HTML
15 lines
No EOL
500 B
HTML
{{- $context := .context }}
|
|
{{- $file := .file }}
|
|
{{- $hideFirstHeading := .hidefirstheading | default false }}
|
|
{{- if eq (printf "%T" $hideFirstHeading) "string" }}
|
|
{{- $hideFirstHeading = (eq $hideFirstHeading "true") }}
|
|
{{- end }}
|
|
{{- if and (gt (len (trim $file " ")) 0) (fileExists $file) }}
|
|
{{- if $hideFirstHeading }}<div class="include hide-first-heading">{{ end }}
|
|
{{- with $context }}
|
|
|
|
{{ $file | readFile | safeHTML }}
|
|
|
|
{{- end }}
|
|
{{- if $hideFirstHeading }}</div>{{ end }}
|
|
{{- end }} |