]> danix's work - danix.xyz-2.git/commitdiff
feat: make breadcrumb navigation multilingual with proper links
authorDanilo M. <redacted>
Thu, 16 Apr 2026 14:23:50 +0000 (16:23 +0200)
committerDanilo M. <redacted>
Thu, 16 Apr 2026 14:23:50 +0000 (16:23 +0200)
- Added language-aware breadcrumb links (IT uses /it/ subdir, EN uses root)
- Added 'home' translation key to both i18n files
- Breadcrumb now displays translated labels and correct URLs for each language

Co-Authored-By: Claude Haiku 4.5 <redacted>
i18n/en.yaml
i18n/it.yaml
themes/danix-xyz-hacker/layouts/partials/breadcrumb.html

index 64b0a267c319d29214446a9ab0b72104e66a3ec0..d543e6fb548e99b0327d079c33f51417a903a029 100644 (file)
@@ -1,4 +1,5 @@
 # Navigation & UI
+home: "Home"
 articles: "Articles"
 about: "About"
 here: "Contact"
index 19847e336b4599530a12e767f4ad05e340b52989..2f8d8e1fe135db153179de67f115f58bd13a5af1 100644 (file)
@@ -1,4 +1,5 @@
 # Navigation & UI
+home: "Home"
 articles: "Articoli"
 about: "Chi Sono"
 here: "Contatti"
index cae934485c4c51e22b6627e2b043b19ef3f9c58d..aa7c1e8bbbcf15db09565c9105a91925fe02b535 100644 (file)
@@ -1,7 +1,14 @@
+{{ $homeLink := "/" }}
+{{ $articlesLink := "/articles/" }}
+{{ if eq .Lang "it" }}
+  {{ $homeLink = "/it/" }}
+  {{ $articlesLink = "/it/articles/" }}
+{{ end }}
+
 <nav class="breadcrumb mb-6" aria-label="Breadcrumb">
-  <a href="/">Home</a>
+  <a href="{{ $homeLink }}">{{ i18n "home" }}</a>
   <span class="breadcrumb-separator">/</span>
-  <a href="/articles/">Articles</a>
+  <a href="{{ $articlesLink }}">{{ i18n "articles" }}</a>
   <span class="breadcrumb-separator">/</span>
   <span>{{ .Title }}</span>
 </nav>