- 'name' is a separate 'identifier'-like Menu property. So use ":menu" to get the menu entry 'name' (not to be confused with the menu 'name' property!) - Allow white space in menu entry 'name' (Example: https://discourse.gohugo.io/t/working-with-multiple-menus-and-iterating-over-the-whole-set/7503) - Refactor: menu-name(-str) -> menu-entry(-str) to prevent confusing that with the menu name property. - Remove 'children' from the list of settable Menu properties. As its datatype is "Menu" and not "string" (from docs), I don't see that as something a user would set. I believe, a user setting a menu parent will mirror that menu entry as a child automatically in that parent entry. - Allow inheritance of HUGO_FRONT_MATTER_FORMAT property too. - Add examples of white space use in ":menu" and ":name" for TOML and YAML front mattermaster
parent
a2e5b675d9
commit
8068f34ab7
7 changed files with 66 additions and 29 deletions
@ -1,13 +1,13 @@ |
||||
--- |
||||
title : "Menu Meta Data in YAML Front Matter" |
||||
date : 2017-07-18 |
||||
title : "White space in menu entry" |
||||
date : 2017-07-19 |
||||
tags : ["menu", "yaml"] |
||||
draft : false |
||||
menu : |
||||
main: |
||||
parent : "posts" |
||||
"something here": |
||||
weight : 25 |
||||
identifier : "menu-yaml" |
||||
--- |
||||
|
||||
Testing the addition of *menu* meta data to the YAML front matter. Here the front matter format is set to YAML using the `HUGO_FRONT_MATTER_FORMAT` key in property drawer. |
||||
|
||||
Here there is white space in menu entry keyword. |
||||
|
||||
@ -0,0 +1,15 @@ |
||||
--- |
||||
title : "White space in menu name" |
||||
date : 2017-07-19 |
||||
tags : ["menu", "yaml"] |
||||
draft : false |
||||
menu : |
||||
main: |
||||
parent : "posts" |
||||
weight : 25 |
||||
name : "Menu in YAML" |
||||
--- |
||||
|
||||
Testing the addition of *menu* meta data to the YAML front matter. Here the front matter format is set to YAML using the `HUGO_FRONT_MATTER_FORMAT` key in property drawer. |
||||
|
||||
Here there is white space in menu name property. |
||||
Loading…
Reference in new issue