From: Bjørn Erik Pedersen Date: Mon, 14 Mar 2016 13:10:15 +0000 (+0100) Subject: Create an alias from shortcode.Page.Site to shortcode.Site X-Git-Tag: v0.16~242 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0fb31e4a823f1469bf288097a99d3744ee719acf;p=brevno-suite%2Fhugo Create an alias from shortcode.Page.Site to shortcode.Site Fixes #1976 --- diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go index 57809321..b221ff8a 100644 --- a/hugolib/shortcode.go +++ b/hugolib/shortcode.go @@ -38,6 +38,10 @@ type ShortcodeWithPage struct { IsNamedParams bool } +func (scp *ShortcodeWithPage) Site() *SiteInfo { + return scp.Page.Site +} + func (scp *ShortcodeWithPage) Ref(ref string) (string, error) { return scp.Page.Ref(ref) }