mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Add Page.RenderShortcodes
A layouts/shortcodes/include.html shortcode may look like this: ```html {{ $p := site.GetPage (.Get 0) }} {{ $p.RenderShortcodes }} ``` Fixes #7297
This commit is contained in:
@@ -86,6 +86,7 @@ type pageOutput struct {
|
||||
page.ContentProvider
|
||||
page.PageRenderProvider
|
||||
page.TableOfContentsProvider
|
||||
page.RenderShortcodesProvider
|
||||
|
||||
// May be nil.
|
||||
cp *pageContentOutput
|
||||
@@ -99,6 +100,7 @@ func (p *pageOutput) initContentProvider(cp *pageContentOutput) {
|
||||
p.ContentProvider = cp
|
||||
p.PageRenderProvider = cp
|
||||
p.TableOfContentsProvider = cp
|
||||
p.RenderShortcodesProvider = cp
|
||||
p.cp = cp
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user