diff --git a/hugolib/menu_test.go b/hugolib/menu_test.go index 667105f50..6cab0a29a 100644 --- a/hugolib/menu_test.go +++ b/hugolib/menu_test.go @@ -283,7 +283,7 @@ func doTestMenuWithUnicodeUrls(t *testing.T, canonifyUrls, uglyUrls bool) { expectedBase := "/%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8-%D0%BF%D1%80%D0%BE%D0%B5%D0%BA%D1%82%D0%B0" if !canonifyUrls { - expectedBase = "/zoo" + expectedBase + expectedBase = "/Zoo" + expectedBase } var expected string @@ -440,7 +440,7 @@ func getTestMenuState(s *Site, t *testing.T) *testMenuState { } viper.Set("menu", menus["menu"]) - viper.Set("baseurl", "http://foo.local/zoo/") + viper.Set("baseurl", "http://foo.local/Zoo/") return menuState } diff --git a/hugolib/site.go b/hugolib/site.go index 95a978f93..39e900cfd 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -614,10 +614,11 @@ func (s *Site) getMenusFromConfig() Menus { if strings.HasPrefix(menuEntry.Url, "/") { // make it match the nodes menuEntryUrl := menuEntry.Url + menuEntryUrl = s.prepUrl(menuEntryUrl) if !s.Info.canonifyUrls { menuEntryUrl = helpers.AddContextRoot(string(s.Info.BaseUrl), menuEntryUrl) } - menuEntry.Url = s.prepUrl(menuEntryUrl) + menuEntry.Url = menuEntryUrl } if ret[name] == nil {