summaryrefslogtreecommitdiffstats
path: root/hugolib/site_new.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-07-07 18:41:10 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-07-08 16:08:46 +0200
commit92e86702eab5d68cd4eda87069fba906139f5c08 (patch)
tree6edb31f509cb321b3ab9d038bfd6d50ea07f6fac /hugolib/site_new.go
parent6c9ea022a9022a281031eed75ceb00c4c03f2b5a (diff)
Fix defaultContentLanguageInSubdir with only 1 language
Fixes #10064
Diffstat (limited to 'hugolib/site_new.go')
-rw-r--r--hugolib/site_new.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/hugolib/site_new.go b/hugolib/site_new.go
index c6c5cd2a3..61273d3c8 100644
--- a/hugolib/site_new.go
+++ b/hugolib/site_new.go
@@ -470,16 +470,11 @@ func (s *Site) IsMultiLingual() bool {
}
func (s *Site) LanguagePrefix() string {
- conf := s.s.Conf
- if !conf.IsMultiLingual() {
+ prefix := s.GetLanguagePrefix()
+ if prefix == "" {
return ""
}
-
- if !conf.DefaultContentLanguageInSubdir() && s.language.Lang == conf.DefaultContentLanguage() {
- return ""
- }
-
- return "/" + s.language.Lang
+ return "/" + prefix
}
// Returns the identity of this site.