mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
Add shortcut to Scratch from shortcode
This commit is contained in:
@@ -42,6 +42,10 @@ func (scp *ShortcodeWithPage) RelRef(ref string) (string, error) {
|
||||
return scp.Page.RelRef(ref)
|
||||
}
|
||||
|
||||
func (scp *ShortcodeWithPage) Scratch() *Scratch {
|
||||
return scp.Page.Scratch()
|
||||
}
|
||||
|
||||
func (scp *ShortcodeWithPage) Get(key interface{}) interface{} {
|
||||
if reflect.ValueOf(scp.Params).Len() == 0 {
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user