diff options
author | Bjørn Erik Pedersen <[email protected]> | 2019-04-12 09:50:36 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-04-12 10:04:17 +0200 |
commit | 9e9a1f92baf151f8d840d6b5b963945d1410ce25 (patch) | |
tree | 036b5263e6965bd46f07b3557676fea4ae9557cc /navigation/pagemenus.go | |
parent | f7375c497239115cd30ae42af6b4d298e4e7ad7d (diff) | |
download | hugo-9e9a1f92baf151f8d840d6b5b963945d1410ce25.tar.gz hugo-9e9a1f92baf151f8d840d6b5b963945d1410ce25.zip |
hugolib: Fix simple menu config
This stopped working in Hugo 0.55:
```bash
---
menu: "main"
---
```
This was also the case for using a slice of menu entries.
This still worked:
---
menu:
main:
weight: 30
---
Diffstat (limited to 'navigation/pagemenus.go')
-rw-r--r-- | navigation/pagemenus.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/navigation/pagemenus.go b/navigation/pagemenus.go index 86a4aeaec..c0d809ee3 100644 --- a/navigation/pagemenus.go +++ b/navigation/pagemenus.go @@ -60,7 +60,7 @@ func PageMenusFromPage(p Page) (PageMenus, error) { if err == nil { me.Menu = mname pm[mname] = &me - return nil, nil + return pm, nil } // Could be a slice of strings @@ -71,7 +71,7 @@ func PageMenusFromPage(p Page) (PageMenus, error) { me.Menu = mname pm[mname] = &me } - return nil, nil + return pm, nil } // Could be a structured menu entry |