From a423677c42b7a3f755ee5c2ba434ed77ef6f6b99 Mon Sep 17 00:00:00 2001 From: Oleksii Dobrovolskyi Date: Wed, 14 Feb 2024 17:30:00 +0200 Subject: Add Home to extra.main_menu so it can be translated on the multilingual websites --- README.md | 4 ++++ config.toml | 4 ++++ templates/nav.html | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index db77233..7ebe80b 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,10 @@ Please check out the included [config.toml](https://codeberg.org/alanpearce/zola Create an array in `extra` with a key of `main_menu`. `url` is passed to [`get_url`](https://www.getzola.org/documentation/templates/overview/#get-url) ```toml +[[extra.main_menu]] +name = "Home" +url = "/" + [[extra.main_menu]] name = "Bear" url = "@/bear.md" diff --git a/config.toml b/config.toml index 78e9f9a..bd675af 100644 --- a/config.toml +++ b/config.toml @@ -22,6 +22,10 @@ highlight_code = true date_format="%d %b, %Y" webserver_sends_csp_headers=true +[[extra.main_menu]] +name = "Home" +url = "/" + [[extra.main_menu]] name = "Bear" url = "@/bear.md" diff --git a/templates/nav.html b/templates/nav.html index e18fda2..a71652e 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -1,4 +1,3 @@ -Home {%- if config.extra.main_menu %} {%- for item in config.extra.main_menu %} {%- if item.url is matching("https?://") %} -- cgit 1.4.1