hugo/hugolib
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
..
doctree
filesystems common/hugo: Rename IsMultiHost and IsMultiLingual 2024-03-13 17:34:42 +02:00
paths
segments Add segments config + --renderSegments flag 2024-03-16 15:53:26 +01:00
testdata
testsite
404_test.go all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
alias.go
alias_test.go
breaking_changes_test.go
cascade_test.go Fix panic when cascading headless from site config to section that does not have an _index.md file 2024-02-28 19:26:55 +01:00
codeowners.go
collections.go
collections_test.go
config.go all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
config_test.go tpl/tplimpl: Optionally exclude content from sitemap 2024-04-02 11:21:03 +02:00
configdir_test.go
content_factory.go
content_factory_test.go
content_map.go all: Typo fixes 2024-04-11 09:23:17 +02:00
content_map_page.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
content_map_test.go Fix section page resource not published if resource filename partially matches content file name 2024-03-07 09:50:50 +01:00
content_render_hooks_test.go Create default link and image render hooks 2024-01-30 20:12:19 +01:00
datafiles_test.go Fix assets vs data issue 2024-02-28 19:26:55 +01:00
dates_test.go all: Fix typos and some URLs 2024-02-18 12:16:30 +01:00
disableKinds_test.go Fix disabled languages regression 2024-02-01 19:42:55 +01:00
embedded_shortcodes_test.go tpl/tplimpl: Improve youtube shortcode 2024-04-04 11:08:30 +02:00
embedded_templates_test.go tpl/tplimpl: Remove trailing slash from void elements 2024-04-01 08:07:02 -07:00
fileInfo.go
fileInfo_test.go
frontmatter_test.go
gitinfo.go
hugo_modules_test.go
hugo_sites.go Add segments config + --renderSegments flag 2024-03-16 15:53:26 +01:00
hugo_sites_build.go hugolib: Display server address after each rebuild 2024-04-13 22:16:00 +02:00
hugo_sites_build_errors_test.go
hugo_sites_build_test.go
hugo_sites_multihost_test.go common/hugo: Rename IsMultiHost and IsMultiLingual 2024-03-13 17:34:42 +02:00
hugo_sites_test.go
hugo_smoke_test.go
hugolib_integration_test.go
image_test.go
integrationtest_builder.go Fix and add integration test for the Bootstrap SCSS module for both Dart Sass and Libsass 2024-03-01 14:18:52 +01:00
language_content_dir_test.go
language_test.go Filter dot files etc. in i18n 2024-02-05 14:54:02 +01:00
menu_test.go Fix sectionPagesMenu for pages in root level 2024-04-05 17:38:08 +02:00
minify_publisher_test.go
mount_filters_test.go Fix Name for nested resourced fetched in resources.ByName and similar 2024-03-13 18:59:50 +02:00
page.go Fix potential deadlock in Translations 2024-03-20 12:33:05 +01:00
page__common.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
page__content.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
page__data.go Don't use the same value in .Data.Term.Title as in .Title 2024-02-17 12:34:50 +01:00
page__fragments_test.go
page__menus.go
page__meta.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
page__meta_test.go Fix draft for non-default content when content in default language does not exist 2024-02-28 19:26:55 +01:00
page__new.go Fix taxonomy kind template lookup issue 2024-03-07 09:50:50 +01:00
page__output.go Fix rebuild with resources.Concat 2024-02-16 13:17:53 +01:00
page__paginator.go
page__paths.go all: Fix typos and some URLs 2024-02-18 12:16:30 +01:00
page__per_output.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
page__position.go hugolib: Formally deprecate .Page.NextPage .Page.PrevPage 2024-02-03 17:28:52 +01:00
page__ref.go
page__tree.go Fix .Parent when there are overlapping regular pages inbetween 2024-03-16 14:48:04 +01:00
page_kinds.go
page_permalink_test.go
page_test.go hugolib: Fix regression for blank summaries 2024-04-05 17:43:55 +02:00
page_unwrap.go
page_unwrap_test.go
pagebundler_test.go Fix resource bundling for overlapping page.md vs page.txt 2024-04-02 14:32:05 +02:00
pagecollections.go Speed up GetPage 2024-02-23 16:29:21 +01:00
pagecollections_test.go Fix .Page.Pages with similary named sections 2024-02-28 16:43:19 +01:00
pages_capture.go Fix server rebuilds when adding sub sections especially on Windows 2024-03-15 15:42:56 +01:00
pages_language_merge_test.go
pages_test.go
paginator_test.go Improve nilpointer error message 2024-02-01 19:53:51 +01:00
params_test.go Handle build vs _build in front matter 2024-02-03 15:07:59 +01:00
permalinker.go
prune_resources.go
rebuild_test.go Fix rebuild when changing mixed case named templates 2024-03-20 12:33:05 +01:00
rendershortcodes_test.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
renderstring_test.go
resource_chain_test.go
robotstxt_test.go Fix robots.txt using the built-in template regression 2024-02-20 11:17:44 +01:00
rss_test.go
securitypolicies_test.go
shortcode.go Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
shortcode_page.go
shortcode_test.go
site.go Fix sectionPagesMenu for pages in root level 2024-04-05 17:38:08 +02:00
site_benchmark_new_test.go
site_new.go hugolib: Conditionally suppress .Site.Author deprecation notice 2024-03-26 10:28:03 +01:00
site_output.go
site_output_test.go Fix regression for outputs defined in front matter for term pages 2024-03-19 15:07:48 +01:00
site_render.go Add segments config + --renderSegments flag 2024-03-16 15:53:26 +01:00
site_sections.go
site_sections_test.go Fix .Parent when there are overlapping regular pages inbetween 2024-03-16 14:48:04 +01:00
site_stats_test.go
site_test.go Fix relref regression with trailing slash 2024-02-21 17:27:45 +01:00
site_url_test.go
siteJSONEncode_test.go
sitemap_test.go tpl/tplimpl: Optionally exclude content from sitemap 2024-04-02 11:21:03 +02:00
taxonomy_test.go Don't auto-create empty sections for nested taxonomies 2024-03-07 09:50:50 +01:00
template_test.go
testhelpers_test.go tpl/tplimpl: Update Google Analytics template and config 2024-03-26 15:40:51 +01:00