mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-29 05:12:35 +00:00
df11327ba9
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 |
||
---|---|---|
.. | ||
cast | ||
collections | ||
compare | ||
crypto | ||
css | ||
data | ||
debug | ||
diagrams | ||
encoding | ||
fmt | ||
hugo | ||
images | ||
inflect | ||
internal | ||
js | ||
lang | ||
math | ||
openapi | ||
os | ||
page | ||
partials | ||
path | ||
reflect | ||
resources | ||
safe | ||
site | ||
strings | ||
templates | ||
time | ||
tplimpl | ||
transform | ||
urls | ||
template.go | ||
template_info.go | ||
template_test.go |