Menu extrrra shorrrtcuts
Ye can define additional menu entries or shortcuts 'n th' navigat'n menu without any link t' rambl'n.
Basic configurat'n
Edit th' website configurat'n config.toml
an' add a [[menu.shortcuts]]
entry fer each link yer want t' add.
Example from th' current website:
[[menu.shortcuts]]
name = "<i class='fab fa-github'></i> GitHub repo"
identifier = "ds"
url = "https://github.com/McShelby/hugo-theme-relearn"
weight = 10
[[menu.shortcuts]]
name = "<i class='fas fa-camera'></i> Showcases"
url = "/showcase"
weight = 11
[[menu.shortcuts]]
name = "<i class='fas fa-bookmark'></i> Cap'n Hugo Documentation"
identifier = "hugodoc"
url = "https://gohugo.io/"
weight = 20
[[menu.shortcuts]]
name = "<i class='fas fa-bullhorn'></i> Credits"
url = "/credits"
weight = 30
By default, shortcuts be preceded by a title. This title can be disabled by sett'n disableShortcutsTitle=true
.
However, if ye want t' keep th' title but change its value, it can be overriden by chang'n yer local i18n translat'n str'n configurat'n.
For example, 'n yer local i18n/en.toml
file, add th' follow'n rambl'n
[Shortcuts-Title]
other = "<Your value>"
Read more about hugo menu an' hugo i18n translat'n str'ns
Configurat'n fer Multilingual mode
When us'n a multilingual website, ye can set different menus fer each language. In th' config.toml
file, prefix yer menu configurat'n by Languages.<language-id>
.
Example from th' current website:
[Languages]
[Languages.en]
title = "Documentation for Hugo Relearn Theme"
weight = 1
languageName = "English"
[[Languages.en.menu.shortcuts]]
name = "<i class='fab fa-github'></i> GitHub repo"
identifier = "ds"
url = "https://github.com/McShelby/hugo-theme-relearn"
weight = 10
[[Languages.en.menu.shortcuts]]
name = "<i class='fas fa-camera'></i> Showcases"
url = "/showcase"
weight = 11
[[Languages.en.menu.shortcuts]]
name = "<i class='fas fa-bookmark'></i> Cap'n Hugo Documentation"
identifier = "hugodoc"
url = "https://gohugo.io/"
weight = 20
[[Languages.en.menu.shortcuts]]
name = "<i class='fas fa-bullhorn'></i> Credits"
url = "/credits"
weight = 30
[Languages.pir]
title = "Documentat'n fer Cap'n Hugo Relearrrn Theme"
weight = 2
languageName = "Arrr! Pirrrates"
[[Languages.pir.menu.shortcuts]]
name = "<i class='fab fa-github'></i> GitHub repo"
identifier = "ds"
url = "https://github.com/McShelby/hugo-theme-relearn"
weight = 10
[[Languages.pir.menu.shortcuts]]
name = "<i class='fas fa-camera'></i> Showcases"
url = "/showcase"
weight = 11
[[Languages.pir.menu.shortcuts]]
name = "<i class='fas fa-bookmark'></i> Cap'n Hugo Documentat'n"
identifier = "hugodoc"
url = "https://gohugo.io/"
weight = 20
[[Languages.pir.menu.shortcuts]]
name = "<i class='fas fa-bullhorn'></i> Crrredits"
url = "/credits"
weight = 30
Read more about hugo menu an' hugo multilingual menus