Make string sorting (e.g. ByTitle, ByLinkTitle and ByParam) language aware

Fixes #2180
This commit is contained in:
Bjørn Erik Pedersen
2022-04-10 20:30:52 +02:00
parent 82ba634ed9
commit 627eed1d62
11 changed files with 297 additions and 31 deletions

View File

@@ -739,7 +739,12 @@ func (s *SiteInfo) Sites() page.Sites {
}
// Current returns the currently rendered Site.
// If that isn't set yet, which is the situation before we start rendering,
// if will return the Site itself.
func (s *SiteInfo) Current() page.Site {
if s.s.h.currentSite == nil {
return s
}
return s.s.h.currentSite.Info
}