diff options
Diffstat (limited to 'docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/include.html')
-rw-r--r-- | docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/include.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/include.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/include.html new file mode 100644 index 000000000..a13dd756a --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/include.html @@ -0,0 +1,20 @@ +{{- /* +Renders the page using the RenderShortcode method on the Page object. + +You must call this shortcode using the {{% %}} notation. + +@param {string} (postional parameter 0) The path to the page, relative to the content directory. +@returns template.HTML + +@example {{% include "functions/_common/glob-patterns" %}} +*/}} + +{{- with .Get 0 }} + {{- with 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 }} |