mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Fix aliases with relativeURLs
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
01e249e97c
commit
145b3fcce3
@@ -383,7 +383,7 @@ func (s *Site) renderMainLanguageRedirect() error {
|
||||
if found {
|
||||
mainLang := s.h.multilingual.DefaultLang
|
||||
if s.Info.defaultContentLanguageInSubdir {
|
||||
mainLangURL := s.PathSpec.AbsURL(mainLang.Lang, false)
|
||||
mainLangURL := s.PathSpec.AbsURL(mainLang.Lang+"/", false)
|
||||
s.Log.DEBUG.Printf("Write redirect to main language %s: %s", mainLang, mainLangURL)
|
||||
if err := s.publishDestAlias(true, "/", mainLangURL, html, nil); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user