2022-06-22 18:32:18 +00:00
|
|
|
{{- $context := .context }}
|
|
|
|
{{- $file := .file }}
|
2022-06-23 11:22:04 +00:00
|
|
|
{{- $hideFirstHeading := .hidefirstheading | default false }}
|
|
|
|
{{- if eq (printf "%T" $hideFirstHeading) "string" }}
|
|
|
|
{{- $hideFirstHeading = (eq $hideFirstHeading "true") }}
|
2022-06-22 18:32:18 +00:00
|
|
|
{{- end }}
|
2023-02-19 22:09:51 +00:00
|
|
|
{{- if and (gt (len (trim $file " ")) 0) (fileExists $file) }}
|
|
|
|
{{- if $hideFirstHeading }}<div class="include hide-first-heading">{{ end }}
|
|
|
|
{{- with $context }}
|
2022-06-22 18:32:18 +00:00
|
|
|
|
|
|
|
{{ $file | readFile | safeHTML }}
|
|
|
|
|
2023-02-19 22:09:51 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- if $hideFirstHeading }}</div>{{ end }}
|
2022-06-22 18:32:18 +00:00
|
|
|
{{- end }}
|