1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

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

@@ -38,7 +38,7 @@ func (n *Node) Now() time.Time {
func (n *Node) HasMenuCurrent(menuId string, inme *MenuEntry) bool {
if inme.HasChildren() {
me := MenuEntry{Name: n.Title, Url: string(n.Permalink)}
me := MenuEntry{Name: n.Title, Url: n.Url}
for _, child := range inme.Children {
if me.IsSameResource(child) {
@@ -52,8 +52,7 @@ func (n *Node) HasMenuCurrent(menuId string, inme *MenuEntry) bool {
func (n *Node) IsMenuCurrent(menuId string, inme *MenuEntry) bool {
me := MenuEntry{Name: n.Title, Url: string(n.Permalink)}
me := MenuEntry{Name: n.Title, Url: n.Url}
if !me.IsSameResource(inme) {
return false
}