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

Revert "Make Urls in menus respect CanonifyUrls"

This reverts commit 3ccb397902.
This commit is contained in:
bep
2014-12-11 05:33:40 +01:00
parent 3ccb397902
commit 9b04c27998
4 changed files with 7 additions and 8 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: n.Url}
me := MenuEntry{Name: n.Title, Url: string(n.Permalink)}
for _, child := range inme.Children {
if me.IsSameResource(child) {
@@ -52,7 +52,8 @@ func (n *Node) HasMenuCurrent(menuId string, inme *MenuEntry) bool {
func (n *Node) IsMenuCurrent(menuId string, inme *MenuEntry) bool {
me := MenuEntry{Name: n.Title, Url: n.Url}
me := MenuEntry{Name: n.Title, Url: string(n.Permalink)}
if !me.IsSameResource(inme) {
return false
}