File: include.html

package info (click to toggle)
hugo 0.155.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 43,600 kB
  • sloc: javascript: 31,879; ansic: 2,350; xml: 350; makefile: 196; sh: 110
file content (20 lines) | stat: -rw-r--r-- 739 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{{/* 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 }}