hugo-theme-relearn/layouts/partials/shortcodes/include.html
2022-06-22 21:41:23 +02:00

13 lines
No EOL
429 B
HTML

{{- $context := .context }}
{{- $file := .file }}
{{- $showFirstHeading := .showfirstheading | default true }}
{{- if eq (printf "%T" $showFirstHeading) "string" }}
{{- $showFirstHeading = (eq $showFirstHeading "true") }}
{{- end }}
{{- if not $showFirstHeading }}<div class="include hide-first-heading">{{ end }}
{{- with $context }}
{{ $file | readFile | safeHTML }}
{{- if not $showFirstHeading }}</div>{{ end }}
{{- end }}