mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +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:
@@ -60,9 +60,10 @@ func NewExecuter(helper ExecHelper) Executer {
|
||||
}
|
||||
|
||||
type (
|
||||
pageContextKeyType string
|
||||
hasLockContextKeyType string
|
||||
stackContextKeyType string
|
||||
pageContextKeyType string
|
||||
hasLockContextKeyType string
|
||||
stackContextKeyType string
|
||||
callbackContextKeyType string
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -70,6 +71,9 @@ const (
|
||||
PageContextKey = pageContextKeyType("page")
|
||||
// Used in partialCached to signal to nested templates that a lock is already taken.
|
||||
HasLockContextKey = hasLockContextKeyType("hasLock")
|
||||
|
||||
// Used to pass down a callback function to nested templates.
|
||||
CallbackContextKey = callbackContextKeyType("callback")
|
||||
)
|
||||
|
||||
// Note: The context is currently not fully implemented in Hugo. This is a work in progress.
|
||||
|
Reference in New Issue
Block a user