summaryrefslogtreecommitdiffstats
path: root/hugolib/site.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-12-06 10:29:28 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-12-06 14:37:25 +0100
commit8378358857d852458d01c667d59d13baa59a719c (patch)
tree2354df95e1d75720cc62bc32329b7154adba3ef8 /hugolib/site.go
parent831d23cb4d1ca99cdc15ed31c8ee1f981497be8f (diff)
hugolib: Add .Site.Sites
Fixes #5504
Diffstat (limited to 'hugolib/site.go')
-rw-r--r--hugolib/site.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/hugolib/site.go b/hugolib/site.go
index d0e6c3018..0579edf6e 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -424,6 +424,10 @@ func (s *SiteInfo) Hugo() hugo.Info {
return s.hugoInfo
}
+// Sites is a convenience method to get all the Hugo sites/languages configured.
+func (s *SiteInfo) Sites() SiteInfos {
+ return s.s.owner.siteInfos()
+}
func (s *SiteInfo) String() string {
return fmt.Sprintf("Site(%q)", s.Title)
}