From: Danilo M. Date: Fri, 17 Apr 2026 10:49:46 +0000 (+0200) Subject: fix: implement proper language-specific 404 layouts X-Git-Tag: release_22042026-1342~122 X-Git-Url: https://git.danix.xyz/?a=commitdiff_plain;h=af5d4055cc830e7fb16786e53f9c1c97d00ea8fc;p=danix.xyz-2.git fix: implement proper language-specific 404 layouts Created 404.en.html and 404.it.html in themes/danix-xyz-hacker/layouts/ following Hugo's standard pattern for language-specific templates. Each layout uses i18n for translations and links to the correct language-specific sections. Hugo automatically selects the correct template based on request language. Co-Authored-By: Claude Haiku 4.5 --- diff --git a/content/en/404.md b/content/en/404.md deleted file mode 100644 index 70d89ca..0000000 --- a/content/en/404.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "404" -url: /404.html -outputs: - - html ---- diff --git a/content/it/404.md b/content/it/404.md deleted file mode 100644 index 0ef9769..0000000 --- a/content/it/404.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "404" -url: "404.html" -outputs: - - html ---- diff --git a/themes/danix-xyz-hacker/layouts/_default/404.html b/themes/danix-xyz-hacker/layouts/404.en.html similarity index 92% rename from themes/danix-xyz-hacker/layouts/_default/404.html rename to themes/danix-xyz-hacker/layouts/404.en.html index 4b313cd..6ed4892 100644 --- a/themes/danix-xyz-hacker/layouts/_default/404.html +++ b/themes/danix-xyz-hacker/layouts/404.en.html @@ -77,17 +77,13 @@ window.articlesData = [
- {{ $homeLink := "/" }} - {{ if eq .Lang "it" }} - {{ $homeLink = "/it/" }} - {{ end }} - + {{ i18n "goHome" }} - + {{ i18n "browseArticles" }} - + {{ i18n "contactSupport" }}
@@ -123,7 +119,7 @@ window.articlesData = [
+
+ + +
+ +
+ + +
+

{{ i18n "easterEggTitle" }}

+ +
+ + + +
+ + +
+
+ + + + +{{ end }}