From 0fb31e4a823f1469bf288097a99d3744ee719acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 14 Mar 2016 14:10:15 +0100 Subject: [PATCH] Create an alias from shortcode.Page.Site to shortcode.Site Fixes #1976 --- hugolib/shortcode.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go index 578093210..b221ff8a7 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) }