-
Notifications
You must be signed in to change notification settings - Fork 0
Adding main menu items
Ram Iyer edited this page Jan 24, 2021
·
2 revisions
The main menu on top supports use of Font Awesome icons. You may choose to use plain words instead of icons, but using icons is more space-saving and more visual.
To create a main menu, create an entry in your config.toml
file, like so:
[menu]
[[menu.main]]
identifier = "archive"
pre = "<i class='fas fa-archive'></i>"
title = "Archive"
url = "/archive/"
weight = 1
[[menu.main]]
identifier = "youtube"
pre = "<i class='fab fa-youtube'></i>"
title = "YouTube"
url = "https://youtube.com/ramiyer"
weight = 2
[[menu.main]]
identifier = "podcast"
pre = "<i class='fas fa-headphones-alt'></i>"
title = "Podcast"
url = "https://anchor.fm/ramiyer"
weight = 3
[[menu.main]]
identifier = "about"
pre = "<i class='fas fa-info'></i>"
title = "About"
url = "/about/"
weight = 4
The pre
parameter is one that identifies what icon is used. You would need to go to the Font Awesome icon list, choose the icon and copy the HTML code.
pre = "<i class='fas fa-info'></i>"
If you do not specify the pre
parameter, the title would be used instead, in the menu.
The weight
parameter, as usual, decides the sequence of the menu items.
Also, this theme uses the free variant of FontAwesome.