hugo/resources
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
..
assets
images
internal
jsconfig
kinds
page Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
postpub
resource
resource_factories
resource_transformers babel: Run go fmt 2024-04-08 18:28:04 +02:00
testdata
docs.go
errorResource.go all: Typo fixes 2024-04-11 09:23:17 +02:00
image.go
image_cache.go
image_extended_test.go
image_test.go
post_publish.go
resource.go
resource_cache.go
resource_metadata.go
resource_spec.go
resource_spec_test.go
resources_integration_test.go
testhelpers_test.go
transform.go
transform_integration_test.go
transform_test.go