Localize all the GroupBy*Date methods

Fixes #9745
This commit is contained in:
Bjørn Erik Pedersen
2022-04-05 09:57:58 +02:00
parent e0a882fd3b
commit 658e11ebaa
13 changed files with 144 additions and 42 deletions
+3
View File
@@ -73,6 +73,9 @@ type HugoSites struct {
// Render output formats for all sites.
renderFormats output.Formats
// The currently rendered Site.
currentSite *Site
*deps.Deps
gitInfo *gitInfo
+1
View File
@@ -289,6 +289,7 @@ func (h *HugoSites) render(config *BuildCfg) error {
i := 0
for _, s := range h.Sites {
h.currentSite = s
for siteOutIdx, renderFormat := range s.renderFormats {
siteRenderContext.outIdx = siteOutIdx
siteRenderContext.sitesOutIdx = i
+5
View File
@@ -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)
}