hugo/resources/page
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
..
page_generate all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
pagemeta Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
siteidentities all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page.go hugolib: Deprecate site methods Author, Authors, and Social 2024-03-15 17:26:45 +01:00
page_author.go hugolib: Deprecate site methods Author, Authors, and Social 2024-03-15 17:26:45 +01:00
page_data.go all: gofmt -w -r 'interface{} -> any' . 2022-03-17 22:03:27 +01:00
page_data_test.go all: Format code with gofumpt 2020-12-03 13:12:58 +01:00
page_integration_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
page_kinds.go Move all Kind constants to its own package 2023-07-28 15:14:23 +02:00
page_lazy_contentprovider.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page_marshaljson.autogen.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page_matcher.go Fix cascade-pattern-with-extension for cascade in site config 2024-02-26 17:29:37 +01:00
page_matcher_test.go common/hugo: Rename IsMultiHost and IsMultiLingual 2024-03-13 17:34:42 +02:00
page_nop.go hugolib: Deprecate site methods Author, Authors, and Social 2024-03-15 17:26:45 +01:00
page_outputformat.go Fix surprise OutputFormat.Rel overwriting 2022-01-04 10:38:38 +01:00
page_paths.go resources/page: Escape hash sign in permalinks 2024-04-05 15:57:02 +02:00
page_wrappers.autogen.go Remove some old and unused deprecation code 2023-11-01 16:40:26 +01:00
pagegroup.go resources/page: Fix typo 2024-02-10 21:28:03 +02:00
pagegroup_test.go Add page fragments support to Related 2023-02-21 17:56:41 +01:00
pages.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
pages_cache.go all: Format code with gofumpt 2020-12-03 13:12:58 +01:00
pages_cache_test.go tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
pages_language_merge.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
pages_prev_next.go Correct typos in Go comments 2023-03-02 16:32:32 +01:00
pages_prev_next_test.go all: Format code with gofumpt 2020-12-03 13:12:58 +01:00
pages_related.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
pages_related_test.go Add page fragments support to Related 2023-02-21 17:56:41 +01:00
pages_sort.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
pages_sort_search.go resources/page: Fix GoDoc comment 2024-03-22 08:56:10 +01:00
pages_sort_search_test.go all: Format code with gofumpt 2020-12-03 13:12:58 +01:00
pages_sort_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
pages_test.go all: gofmt -w -r 'interface{} -> any' . 2022-03-17 22:03:27 +01:00
pagination.go Improve error message when attempting to paginate from a single page template 2024-01-31 16:54:34 +01:00
pagination_test.go Make site.BaseURL and $pager.URL a string 2023-10-30 10:26:06 +01:00
path_integration_test.go resources/page: Escape hash sign in permalinks 2024-04-05 15:57:02 +02:00
permalinks.go all: Fix typos 2024-02-11 13:51:33 +02:00
permalinks_integration_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
permalinks_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
site.go hugolib: Deprecate site methods Author, Authors, and Social 2024-03-15 17:26:45 +01:00
taxonomy.go resources/page: Add taxonomies Page method 2024-04-12 16:26:02 +02:00
taxonomy_integration_test.go resources/page: Add taxonomies Page method 2024-04-12 16:26:02 +02:00
testhelpers_test.go hugolib: Deprecate site methods Author, Authors, and Social 2024-03-15 17:26:45 +01:00
weighted.go Some godoc adjustments and image struct renames 2022-04-27 23:53:56 +02:00
zero_file.autogen.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00