hugo/docs/layouts/_shortcodes/include.html
Bjørn Erik Pedersen 61a286595e
Some checks are pending
Test / test (1.23.x, ubuntu-latest) (push) Waiting to run
Test / test (1.23.x, windows-latest) (push) Waiting to run
Test / test (1.24.x, ubuntu-latest) (push) Waiting to run
Test / test (1.24.x, windows-latest) (push) Waiting to run
Merge commit 'b3d87dd0fd'
2025-04-24 10:23:16 +02:00

20 lines
739 B
HTML

{{/* prettier-ignore-start */ -}}
{{- /*
Renders the page using the RenderShortcode method on the Page object.
You must call this shortcode using the {{% %}} notation.
@param {string} (positional parameter 0) The path to the page, relative to the content directory.
@example {{% include "functions/_common/glob-patterns" %}}
*/ -}}
{{/* prettier-ignore-end */ -}}
{{- with .Get 0 }}
{{- with or ($.Page.GetPage .) (site.GetPage .) }}
{{- .RenderShortcodes }}
{{- else }}
{{- errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position }}
{{- end }}
{{- else }}
{{- errorf "The %q shortcode requires a positional parameter indicating the path of the file to include. See %s" .Name .Position }}
{{- end }}