Fix aliases with relativeURLs

This commit is contained in:
Helder Pereira
2020-06-14 10:14:56 +01:00
committed by Bjørn Erik Pedersen
parent 01e249e97c
commit 145b3fcce3
7 changed files with 54 additions and 43 deletions

View File

@@ -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