mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 17:02:10 -05:00
Added yaml menu example
Added yaml menu example, matching with existing toml example. Also added link to sitewide config page.
This commit is contained in:
parent
5d8ac54f73
commit
6e15f652bd
1 changed files with 15 additions and 1 deletions
|
@ -87,7 +87,7 @@ available.
|
||||||
## Adding (non-content) entries to a menu
|
## Adding (non-content) entries to a menu
|
||||||
|
|
||||||
You can also add entries to menus that aren’t attached to a piece of
|
You can also add entries to menus that aren’t attached to a piece of
|
||||||
content. This takes place in the site wide config file.
|
content. This takes place in the site wide [config file](http://hugo.spf13.com/overview/configuration).
|
||||||
|
|
||||||
Here’s an example (in toml):
|
Here’s an example (in toml):
|
||||||
|
|
||||||
|
@ -101,6 +101,20 @@ Here’s an example (in toml):
|
||||||
pre = "<i class='fa fa-road'></i>"
|
pre = "<i class='fa fa-road'></i>"
|
||||||
weight = -100
|
weight = -100
|
||||||
|
|
||||||
|
Here’s an example (in yaml):
|
||||||
|
|
||||||
|
---
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
- Name: "about hugo"
|
||||||
|
Pre: "<i class='fa fa-heart'></i>"
|
||||||
|
Weight: -110
|
||||||
|
Identifier: "about"
|
||||||
|
- Name: "getting started"
|
||||||
|
Pre: "<i class='fa fa-road'></i>"
|
||||||
|
Weight: -100
|
||||||
|
---
|
||||||
|
|
||||||
## Nesting
|
## Nesting
|
||||||
|
|
||||||
All nesting of content is done via the `parent` field.
|
All nesting of content is done via the `parent` field.
|
||||||
|
|
Loading…
Reference in a new issue