aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/site_render.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-07-13 15:42:30 +0200
committerBjørn Erik Pedersen <[email protected]>2023-07-13 18:06:36 +0200
commitcc44583cc3976bf115c06474f47889d49842315e (patch)
treef0588d654db3371586ed7a439142a70e34dbc705 /hugolib/site_render.go
parent4da672af888cbd0db79463bf456b5210ad9a463d (diff)
downloadhugo-cc44583cc3976bf115c06474f47889d49842315e.tar.gz
hugo-cc44583cc3976bf115c06474f47889d49842315e.zip
Improve behavior of defaultContentLanguageInSubdir when only the default language is enabled
1 .Create sitemapindex in root of publishDir (will contain link to sitemap.xml in defaultContentLanguage site) 2. Create index.html in root of publishDir (will redirect to defaultContentLanguage site) Fixes #11229
Diffstat (limited to 'hugolib/site_render.go')
-rw-r--r--hugolib/site_render.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/site_render.go b/hugolib/site_render.go
index c4c3f389b..f9c1dd498 100644
--- a/hugolib/site_render.go
+++ b/hugolib/site_render.go
@@ -384,7 +384,7 @@ func (s *Site) renderAliases() error {
// renderMainLanguageRedirect creates a redirect to the main language home,
// depending on if it lives in sub folder (e.g. /en) or not.
func (s *Site) renderMainLanguageRedirect() error {
- if !s.h.isMultiLingual() || s.h.Conf.IsMultihost() {
+ if s.h.Conf.IsMultihost() || !(s.h.Conf.DefaultContentLanguageInSubdir() || s.h.Conf.IsMultiLingual()) {
// No need for a redirect
return nil
}