summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-29 13:13:30 +0200
committerDanilo M. <danix@danix.xyz>2026-04-29 13:13:30 +0200
commitdc4eba2c6a709995a2f4718f9fb407f3057a13b8 (patch)
tree0e5dc3a08d2e515272a1b65b7899ffdd5b4688cd
parent9c50525b7ecf4f93e057ecbe162ea818b105319e (diff)
downloaddanixxyz-dc4eba2c6a709995a2f4718f9fb407f3057a13b8.tar.gz
danixxyz-dc4eba2c6a709995a2f4718f9fb407f3057a13b8.zip
feat: external links in main menu — A11y new-tab label + workflow docs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rw-r--r--WORKFLOW.md18
-rw-r--r--i18n/en.yaml1
-rw-r--r--i18n/it.yaml1
m---------themes/danix-xyz-hacker0
4 files changed, 20 insertions, 0 deletions
diff --git a/WORKFLOW.md b/WORKFLOW.md
index c95141f..13a6da3 100644
--- a/WORKFLOW.md
+++ b/WORKFLOW.md
@@ -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
diff --git a/i18n/en.yaml b/i18n/en.yaml
index 65a5b1a..bf35bb4 100644
--- a/i18n/en.yaml
+++ b/i18n/en.yaml
@@ -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"
diff --git a/i18n/it.yaml b/i18n/it.yaml
index 3e4a7a4..31424ea 100644
--- a/i18n/it.yaml
+++ b/i18n/it.yaml
@@ -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"
diff --git a/themes/danix-xyz-hacker b/themes/danix-xyz-hacker
-Subproject 1815a9655e832a689891ee0843c8f5633a1bb4f
+Subproject 997ea90b7f85329476771e8b30a38fb86c18a07