hugo/tpl
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
..
cast
collections Fix intersect and similar for term entry page collections 2024-03-15 16:45:53 +01:00
compare
crypto
css
data
debug Fix panic with debug.Dump with Page when running the server 2024-03-26 20:41:30 +01:00
diagrams
encoding
fmt
hugo
images
inflect
internal Upgrade to Go 1.22.1 2024-03-15 16:40:36 +01:00
js
lang errors: Return error from cast.ToStringE() consistently 2024-04-04 11:00:14 +02:00
math
openapi
os
page
partials
path
reflect
resources
safe
site
strings tpl/strings: Improve type checking 2024-04-04 18:34:55 +02:00
templates
time
tplimpl Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
transform helpers: Fix TrimShortHTML when used with AsciiDoc content 2024-04-14 17:53:05 +02:00
urls all: Fix duplicate words in comments 2024-04-11 09:31:33 +02:00
template.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
template_info.go
template_test.go