summaryrefslogtreecommitdiffstats
path: root/hugolib/shortcode.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-03-14 14:10:15 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-03-14 14:10:15 +0100
commit0fb31e4a823f1469bf288097a99d3744ee719acf (patch)
tree9699079dc0b2d0cf80cc0ce6c3b2a2db298cf5a6 /hugolib/shortcode.go
parent734dd1c4d0236fb38b5646d680f2c37659cf67a3 (diff)
Create an alias from shortcode.Page.Site to shortcode.Site
Fixes #1976
Diffstat (limited to 'hugolib/shortcode.go')
-rw-r--r--hugolib/shortcode.go4
1 files changed, 4 insertions, 0 deletions
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)
}