diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-17 11:43:08 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-17 11:43:08 +0200 |
| commit | db63ac7d287909b5f4bde23d460d8c4f3731b63e (patch) | |
| tree | 3e45ece32c8c1aee1bada545e280371625eb0acf /themes | |
| parent | a31a0ad53086b02531d49d0ef551597d0d482da4 (diff) | |
| download | danixxyz-db63ac7d287909b5f4bde23d460d8c4f3731b63e.tar.gz danixxyz-db63ac7d287909b5f4bde23d460d8c4f3731b63e.zip | |
fix: use language-aware URL construction for 404 navigation links
Updated home, articles, and contact links to properly handle IT/EN language
routing by checking .Lang and building URLs without BaseURL prefix, matching
the pattern used in header.html
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/404.html | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/themes/danix-xyz-hacker/layouts/404.html b/themes/danix-xyz-hacker/layouts/404.html index 00dcfcf..a81f34d 100644 --- a/themes/danix-xyz-hacker/layouts/404.html +++ b/themes/danix-xyz-hacker/layouts/404.html @@ -77,13 +77,17 @@ window.articlesData = [ <!-- Navigation Links --> <div class="space-y-4 flex flex-col items-center mb-12"> - <a href="{{ .Site.BaseURL }}" class="btn btn-primary"> + {{ $homeLink := "/" }} + {{ if eq .Lang "it" }} + {{ $homeLink = "/it/" }} + {{ end }} + <a href="{{ $homeLink }}" class="btn btn-primary"> {{ i18n "goHome" }} </a> - <a href="{{ .Site.BaseURL }}{{ .Site.Language.Lang }}/articles/" class="btn btn-secondary"> + <a href="{{ if eq .Lang "it" }}/it{{ end }}/articles/" class="btn btn-secondary"> {{ i18n "browseArticles" }} </a> - <a href="{{ .Site.BaseURL }}{{ .Site.Language.Lang }}/is/here/" class="btn btn-outline"> + <a href="{{ if eq .Lang "it" }}/it{{ end }}/is/here/" class="btn btn-outline"> {{ i18n "contactSupport" }} </a> </div> |
