We predefined two types of menus: main and footer, represents the top app bar menus and the footer menus, respectively.
This article will briefly introduce how to use the menus.
Menu Entry Properties
| 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 | Menu parameters. |
params.divider | Boolean | true means divider. |
params.icon | String | The icon HTML. |
params.description | String | The description for top app bar’s dropdown menus only. |
See also Menu Entry Properties.
Usage
Configuration
The menu configuration file is located in
config/_default/menu.tomlby default.
Let’s take main menu as an example:
1% code/menu-main-configuration %
See Icons for importing icons and setting the icon’s color.
Front Matter
We can also configure menu via page front matter.
1% code/menu-footer-configuration %
The code snippet appends the page to the main and footer menu.
It’s no need to specify the
urlandnameparameters.

Comments