mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
node to page: Handle URLs
This includes removing the error return value from Permalink and RelPermalink. We ignore that error all over the place, so we might as well remove it. Updates #2297
This commit is contained in:
parent
c8d3124dde
commit
524eb16686
8 changed files with 105 additions and 63 deletions
|
@ -560,7 +560,6 @@ func TestHomeNodeMenu(t *testing.T) {
|
|||
s := setupMenuTests(t, menuPageSources)
|
||||
|
||||
home := s.getPage(KindHome)
|
||||
|
||||
homeMenuEntry := &MenuEntry{Name: home.Title, URL: home.URL()}
|
||||
|
||||
for i, this := range []struct {
|
||||
|
@ -583,7 +582,7 @@ func TestHomeNodeMenu(t *testing.T) {
|
|||
if isMenuCurrent != this.isMenuCurrent {
|
||||
fmt.Println("isMenuCurrent", isMenuCurrent)
|
||||
fmt.Printf("this: %#v\n", this)
|
||||
t.Errorf("[%d] Wrong result from IsMenuCurrent: %v for %q", i, isMenuCurrent, this.menu)
|
||||
t.Errorf("[%d] Wrong result from IsMenuCurrent: %v for %q", i, isMenuCurrent, this.menuItem)
|
||||
}
|
||||
|
||||
if hasMenuCurrent != this.hasMenuCurrent {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue