For customizing the Navigation, you need to open the config/_defaults/menus.toml
file and follow the steps below.
For maintaining it from forestry, you can find it at the bottom of the left sidebar. The file called Menu
Main Navigation
Main navigation is a list of links to other pages. It is rendered in the header of the page.
Normal Menu
[[main]]
is the main loop. You can add your navigation item by copying and pasting this loop.
[[main]]
name = "About"
url = "about/"
weight = 1
name
is for menu item name/text.URL
is for the page URL. To set about page URL here, typeabout/
. You can also use an external URL by putting the URL in this attribute. ex:url = "https://gethugothemes.com/"
weight
is for your navigation sorting. The smaller number weight will show first. You can switch menu items by changing the weight value.
Dropdown Menu
[[main]]
weight = 4
name = "Dropdown"
hasChildren = true
[[main]]
parent = "Dropdown"
name = "Dropdown Item"
url = "https://gethugothemes.com/"
weight = 1
- For dropdown menu, you need to add another attribute called
hasChildren = true
. And removeURL
. Then repeat the[[main]]
loop, and put theparent =
attribute in the dropdown menu item. Parent name should be the same as the dropdown item name. Also, updatename
andURL
attributes.
Footer navigation
Footer navigation settings are similar to the main navigation. Remember that footer menu do not support the dropdown feature.