Become a backer or sponsor to support our work.
This article describes the properties of the menu entry and how to config the menus.
Property | Type | Description |
---|---|---|
name | string | The name of menu. |
identifier | string | The ID of menu. |
weight | number | The weight of menu that used for sorting in ascending order. |
parent | string | The identifier of parent menu entry. |
url | string | The URL of menu. |
pre | string | The leading string before menu name. |
post | string | The trailing string after menu name. |
params | object | Module scoped parameters. |
Each menu set has its own identifier, such as main
, footer
, etc., which is associated with the corresponding module.
Hugo supports two ways of configuring menus: menu configuration files and page menus parameters (aka front matter).
The
main
is the identifier of the menu set.
When we want to add a page to the menu set, the easiest way is to set the following parameters on the page.
It’s no need to explicitly specify the menu name and URL.