From 9c50525b7ecf4f93e057ecbe162ea818b105319e Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 29 Apr 2026 12:32:30 +0200 Subject: docs: add obsolete article banner usage to workflow guide --- WORKFLOW.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'WORKFLOW.md') diff --git a/WORKFLOW.md b/WORKFLOW.md index f8e6fee..c95141f 100644 --- a/WORKFLOW.md +++ b/WORKFLOW.md @@ -66,6 +66,23 @@ git commit -m "config: ..." git push origin master ``` +### Mark an article as obsolete + +Add `obsolete = true` to the article's front matter. Optionally link to a successor article with `successor = "/path/to/article"`: + +```toml ++++ +title = "My Old Article" +# ... other fields ... +obsolete = true +successor = "/articles/my-new-article" ++++ +``` + +The banner appears automatically below the article header. If `successor` is set, it resolves the article title and links to it. Both EN and IT i18n strings are customizable in `i18n/en.yaml` and `i18n/it.yaml`. + +Paths are Hugo permalinks — for English articles, use `/articles/slug`, not `/en/articles/slug`. + --- ## Working on the Theme -- cgit v1.2.3 From dc4eba2c6a709995a2f4718f9fb407f3057a13b8 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 29 Apr 2026 13:13:30 +0200 Subject: feat: external links in main menu — A11y new-tab label + workflow docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- WORKFLOW.md | 18 ++++++++++++++++++ i18n/en.yaml | 1 + i18n/it.yaml | 1 + themes/danix-xyz-hacker | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) (limited to 'WORKFLOW.md') 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 index 1815a96..997ea90 160000 --- a/themes/danix-xyz-hacker +++ b/themes/danix-xyz-hacker @@ -1 +1 @@ -Subproject commit 1815a9655e832a689891ee0843c8f5633a1bb4f5 +Subproject commit 997ea90b7f85329476771e8b30a38fb86c18a07f -- cgit v1.2.3