]> danix's work - danix.xyz-2.git/commitdiff
feat: external links in main menu — A11y new-tab label + workflow docs
authorDanilo M. <redacted>
Wed, 29 Apr 2026 11:13:30 +0000 (13:13 +0200)
committerDanilo M. <redacted>
Wed, 29 Apr 2026 11:13:30 +0000 (13:13 +0200)
Co-Authored-By: Claude Sonnet 4.6 <redacted>
WORKFLOW.md
i18n/en.yaml
i18n/it.yaml
themes/danix-xyz-hacker

index c95141f39ca61d49b9ec4c1f7d7e0bce957ac312..13a6da3bb51a86d4203a62118c2a9009ac847ef6 100644 (file)
@@ -83,6 +83,24 @@ The banner appears automatically below the article header. If `successor` is set
 
 Paths are Hugo permalinks — for English articles, use `/articles/slug`, not `/en/articles/slug`.
 
+### Add an external link to the main menu
+
+Add a menu entry in `hugo.toml` with `params.external = true`:
+
+```toml
+[[menus.main]]
+  name = "GitHub"
+  url = "https://github.com/youruser"
+  weight = 10
+  [menus.main.params]
+    external = true
+```
+
+- `name` is used as-is (not looked up in i18n)
+- `url` must be a full URL including scheme
+- `weight` controls order relative to other menu items
+- External links open in a new tab with `rel="noopener noreferrer"` and include a screen-reader-only "(opens in new tab)" label for WCAG 2.1 AA compliance
+
 ---
 
 ## Working on the Theme
index 65a5b1a191e5fc198f119c506e4391af3524166f..bf35bb4d7a36bb54986ca7278c2f3f75dcbcc9da 100644 (file)
@@ -10,6 +10,7 @@ toggleTheme: "Theme"
 toggleMenu: "Menu"
 closeMenu: "Close"
 mainMenu: "Main navigation"
+opensInNewTab: "(opens in new tab)"
 skipToContent: "Skip to main content"
 email: "Email"
 contact: "Contact"
index 3e4a7a4049f790156d70d70d47740fb7d630a814..31424eadeef261cf89b88b00f636cd5f564274b7 100644 (file)
@@ -10,6 +10,7 @@ toggleTheme: "Tema"
 toggleMenu: "Menu"
 closeMenu: "Chiudi"
 mainMenu: "Navigazione principale"
+opensInNewTab: "(si apre in una nuova scheda)"
 skipToContent: "Salta al contenuto principale"
 email: "Email"
 contact: "Contatti"
index 1815a9655e832a689891ee0843c8f5633a1bb4f5..997ea90b7f85329476771e8b30a38fb86c18a07f 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 1815a9655e832a689891ee0843c8f5633a1bb4f5
+Subproject commit 997ea90b7f85329476771e8b30a38fb86c18a07f