mirror of
https://github.com/imfing/hextra.git
synced 2025-06-19 08:03:35 -04:00
chore: adapt theme to new template system (#696)
* Adapted theme's layout to [Hugo v0.146.0](https://gohugo.io/templates/new-templatesystem-overview/) * Bumped minimal Hugo version to v0.146.0
This commit is contained in:
22
layouts/_shortcodes/include.html
Normal file
22
layouts/_shortcodes/include.html
Normal file
@ -0,0 +1,22 @@
|
||||
{{- /*
|
||||
https://github.com/gohugoio/gohugoioTheme/blob/master/layouts/shortcodes/include.html
|
||||
|
||||
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.
|
||||
@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 }}
|
Reference in New Issue
Block a user