hugo/markup/goldmark
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
..
codeblocks Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
goldmark_config
hugocontext Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
images
internal Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
autoid.go
autoid_test.go
convert.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
convert_test.go
goldmark_integration_test.go
render_hooks.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
toc.go
toc_integration_test.go