hugolib: Fix sitemap index with monolingual site

Fixes #12266
This commit is contained in:
Joe Mooring
2024-03-15 15:15:24 -07:00
committed by Bjørn Erik Pedersen
parent d4d49e0f0e
commit 3935faa417
2 changed files with 57 additions and 2 deletions

View File

@@ -601,7 +601,7 @@ func (h *HugoSites) fileEventsContentPaths(p []pathChange) []pathChange {
// HomeAbsURL is a convenience method giving the absolute URL to the home page.
func (s *Site) HomeAbsURL() string {
base := ""
if len(s.conf.Languages) > 1 {
if len(s.conf.Languages) > 1 || s.Conf.DefaultContentLanguageInSubdir() {
base = s.Language().Lang
}
return s.AbsURL(base, false)