Define navigation in config/_default/menus/.

In this project:

  • menus.en.toml defines English menus
  • menus.nl.toml defines Dutch menus
  • Add menus.<lang>.toml for additional languages when needed

Common menu sections

  • main: top navigation
  • social: social/profile links
  • footer: footer links

Entries are ordered by weight (lower first).

Example

Add a top-level item and a child item in menus.en.toml:

config/_default/menus/menus.en.toml
[[main]]
  name = "Documentation"
  url = "https://docs.thulite.io/"
  weight = 10

[[main]]
  identifier = "thulite-docs"
  name = "Thulite"
  url = "https://docs.thulite.io/"
  parent = "Documentation"
  weight = 11

Use pageRef for internal pages and url for external links.

Learn more

Hugo
Menus

Hugo guide to defining and working with menu entries.

Hugo
Menu localization

How to translate menus for multilingual sites.

Hugo
Menu templates

Template reference for rendering menus in layouts.