hugolib: Add .Site.Sites

Fixes #5504
This commit is contained in:
Bjørn Erik Pedersen
2018-12-06 10:29:28 +01:00
parent 831d23cb4d
commit 8378358857
4 changed files with 22 additions and 8 deletions

View File

@@ -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)
}