hugo/resources/page/pagemeta
Bjørn Erik Pedersen df11327ba9 Pass .RenderShortcodes' Page to render hooks as .PageInner
The main use case for this is to resolve links and resources (e.g. images) relative to the included `Page`.

A typical `include` would similar to this:

```handlebars
{{ with site.GetPage (.Get 0) }}
  {{ .RenderShortcodes }}
{{ end }}
```

And when used in a Markdown file:

```markdown
{{% include "/posts/p1" %}}
```

Any render hook triggered while rendering `/posts/p1` will get `/posts/p1` when calling `.PageInner`.

Note that

* This is only relevant for shortcodes included with `{{%` that calls `.RenderShortcodes`.
* `.PageInner` is available in all render hooks that, before this commit, received `.Page`.
* `.PageInner` will fall back to the value of `.Page` if not relevant and will always have a value.

Fixes #12356
2024-04-15 09:49:57 +02:00
..
page_frontmatter.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
page_frontmatter_test.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
pagemeta.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
pagemeta_integration_test.go Fix front matter date location when value gets inherited from other dates 2024-03-13 19:00:50 +02:00
pagemeta_test.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00