mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-24 21:56:05 +02:00
committed by
Steve Francia
parent
de8fc8761a
commit
048e07422d
@@ -36,6 +36,7 @@ type ShortcodeWithPage struct {
|
||||
Page *Page
|
||||
Parent *ShortcodeWithPage
|
||||
IsNamedParams bool
|
||||
scratch *Scratch
|
||||
}
|
||||
|
||||
func (scp *ShortcodeWithPage) Site() *SiteInfo {
|
||||
@@ -51,7 +52,10 @@ func (scp *ShortcodeWithPage) RelRef(ref string) (string, error) {
|
||||
}
|
||||
|
||||
func (scp *ShortcodeWithPage) Scratch() *Scratch {
|
||||
return scp.Page.Scratch()
|
||||
if scp.scratch == nil {
|
||||
scp.scratch = newScratch()
|
||||
}
|
||||
return scp.scratch
|
||||
}
|
||||
|
||||
func (scp *ShortcodeWithPage) Get(key interface{}) interface{} {
|
||||
|
Reference in New Issue
Block a user