Make Urls in menus respect CanonifyUrls

Fixes #519
This commit is contained in:
bep
2014-12-10 19:37:49 +01:00
parent e6541c45ab
commit 3ccb397902
4 changed files with 8 additions and 7 deletions

View File

@@ -532,10 +532,12 @@ func (s *Site) getMenusFromConfig() Menus {
}
menuEntry.MarshallMap(ime)
if strings.HasPrefix(menuEntry.Url, "/") {
// make it absolute so it matches the nodes
menuEntry.Url = s.permalinkStr(menuEntry.Url)
// make it match the nodes
menuEntry.Url = s.prepUrl(menuEntry.Url)
}
if ret[name] == nil {
ret[name] = &Menu{}
}