summaryrefslogtreecommitdiffstats
path: root/hugolib/site.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-04-05 09:57:58 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-04-05 16:11:11 +0200
commit658e11ebaa94de219f941699d119a97a18301eea (patch)
tree76330777138b792bac1dfcf05e9948d9f5839bcc /hugolib/site.go
parente0a882fd3b9825dc9a95b83d72fc330dcbbbcce9 (diff)
Localize all the GroupBy*Date methods
Fixes #9745
Diffstat (limited to 'hugolib/site.go')
-rw-r--r--hugolib/site.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/hugolib/site.go b/hugolib/site.go
index 59326cab6..efa936830 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -738,6 +738,11 @@ func (s *SiteInfo) Sites() page.Sites {
return s.s.h.siteInfos()
}
+// Current returns the currently rendered Site.
+func (s *SiteInfo) Current() page.Site {
+ return s.s.h.currentSite.Info
+}
+
func (s *SiteInfo) String() string {
return fmt.Sprintf("Site(%q)", s.title)
}