culinary.kemonine.info/themes/hugo-theme-relearn/layouts/partials/shortcodes/include.html
2022-12-03 10:27:03 -05:00

13 lines
422 B
HTML

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