mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
8551ee2738
- supply named parameter if missing #260 - fix boolean parameter if given as string #261 - revise documentation
10 lines
No EOL
419 B
HTML
10 lines
No EOL
419 B
HTML
{{- $file := .Get "file" | default (.Get 0) }}
|
|
{{- $showFirstHeading := .Get "showfirstheading" | default (.Get 1) | default true }}
|
|
{{- if eq (printf "%T" $showFirstHeading) "string" }}
|
|
{{- $showFirstHeading = (eq $showFirstHeading "true") }}
|
|
{{- end }}
|
|
{{- if not $showFirstHeading }}<div class="include hide-first-heading">{{ end }}
|
|
|
|
{{ $file | readFile | safeHTML }}
|
|
|
|
{{- if not $showFirstHeading }}</div>{{ end }} |