hugo/markup
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
..
asciidocext markup/asciidocext: Add Level to Heading struct 2024-03-21 19:14:49 +01:00
blackfriday all: Fix typos and some URLs 2024-02-18 12:16:30 +01:00
converter Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
goldmark Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
highlight testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
internal all: Fix duplicate words in comments 2024-04-11 09:31:33 +02:00
markup_config all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
org all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
pandoc all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
rst all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
tableofcontents all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
markup.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
markup_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00