From 627eed1d620910f494056330733db6c6187b8fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 10 Apr 2022 20:30:52 +0200 Subject: Make string sorting (e.g. ByTitle, ByLinkTitle and ByParam) language aware Fixes #2180 --- hugolib/site.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hugolib/site.go') diff --git a/hugolib/site.go b/hugolib/site.go index d7b5cb64e..bbabf91a3 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -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 } -- cgit v1.2.3