hugo-theme-relearn/layouts/shortcodes/include.html
Sören Weber 8b70bdf31a
Some checks failed
docs-build-deployment / Run deploy (push) Has been cancelled
docs-build / Run build (push) Has been cancelled
theme: guard access to page.File.Filename #1005
2025-01-31 14:57:16 +01:00

9 lines
No EOL
580 B
HTML

{{- if (.Get "showfirstheading") }}
{{- $filepath := "[virtual file]" }}{{ with and .Page .Page.File .Page.File.Filename }}{{ $filepath = . }}{{ end }}
{{- warnf "%q: UNSUPPORTED parameter 'showfirstheading' for shortcode 'include' found, use 'hidefirstheading' instead; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/4/#4-2-0" $filepath }}
{{- end }}
{{- partial "shortcodes/include.html" (dict
"page" .Page
"file" (.Get "file" | default (.Get 0))
"hidefirstheading" (.Get "hidefirstheading" | default (.Get 1))
) }}