aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/site.go
diff options
context:
space:
mode:
authorJoe Mooring <[email protected]>2024-03-15 15:15:24 -0700
committerBjørn Erik Pedersen <[email protected]>2024-03-16 11:49:00 +0100
commit3935faa4175940dbd56b4e3a023163623b4bbdf2 (patch)
tree9c65127de454dd6a9d7c0fea7daeee313dc67a65 /hugolib/site.go
parentd4d49e0f0ec53ef7e105c51b5c6fd198c86acb7e (diff)
downloadhugo-3935faa4175940dbd56b4e3a023163623b4bbdf2.tar.gz
hugo-3935faa4175940dbd56b4e3a023163623b4bbdf2.zip
hugolib: Fix sitemap index with monolingual site
Fixes #12266
Diffstat (limited to 'hugolib/site.go')
-rw-r--r--hugolib/site.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/site.go b/hugolib/site.go
index e7d170d09..2275dbe84 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -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)