mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +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:
@@ -185,8 +185,8 @@ func (scp *ShortcodeWithPage) page() page.Page {
|
||||
// Note - this value must not contain any markup syntax
|
||||
const shortcodePlaceholderPrefix = "HAHAHUGOSHORTCODE"
|
||||
|
||||
func createShortcodePlaceholder(id string, ordinal int) string {
|
||||
return shortcodePlaceholderPrefix + id + strconv.Itoa(ordinal) + "HBHB"
|
||||
func createShortcodePlaceholder(sid string, id, ordinal int) string {
|
||||
return shortcodePlaceholderPrefix + strconv.Itoa(id) + sid + strconv.Itoa(ordinal) + "HBHB"
|
||||
}
|
||||
|
||||
type shortcode struct {
|
||||
|
Reference in New Issue
Block a user