For customizing the Navigation, you need to open the config/_defaults/menus.toml
file and follow the steps below.
Main Navigation
Main navigation is a list of links to other pages. It is rendered in the header of the page. you can find the menus.toml
file in the config/_default
directory.
Normal Menu
[[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.