hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 0fb31e4a823f1469bf288097a99d3744ee719acf
parent 734dd1c4d0236fb38b5646d680f2c37659cf67a3
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Mon, 14 Mar 2016 14:10:15 +0100

Create an alias from shortcode.Page.Site to shortcode.Site

Fixes #1976

Diffstat:
Mhugolib/shortcode.go | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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)
 }