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 all: Typo fixes 2024-04-11 09:23:17 +02:00
hugocontext Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
images all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
internal Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
autoid.go Correct typos in Go comments 2023-03-02 16:32:32 +01:00
autoid_test.go all: Format code with gofumpt 2020-12-03 13:12:58 +01:00
convert.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
convert_test.go markup/goldmark: Improve TOC tests 2024-02-10 16:03:37 +02:00
goldmark_integration_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
render_hooks.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
toc.go markup/goldmark: TOC: render strikethrough, emojis 2024-03-07 14:08:29 +01:00
toc_integration_test.go markup/goldmark: TOC: render strikethrough, emojis 2024-03-07 14:08:29 +01:00