From af5d4055cc830e7fb16786e53f9c1c97d00ea8fc Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 17 Apr 2026 12:49:46 +0200 Subject: 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 --- themes/danix-xyz-hacker/layouts/404.en.html | 151 +++++++++++++++++++++ themes/danix-xyz-hacker/layouts/404.it.html | 151 +++++++++++++++++++++ themes/danix-xyz-hacker/layouts/_default/404.html | 155 ---------------------- 3 files changed, 302 insertions(+), 155 deletions(-) create mode 100644 themes/danix-xyz-hacker/layouts/404.en.html create mode 100644 themes/danix-xyz-hacker/layouts/404.it.html delete mode 100644 themes/danix-xyz-hacker/layouts/_default/404.html (limited to 'themes/danix-xyz-hacker') diff --git a/themes/danix-xyz-hacker/layouts/404.en.html b/themes/danix-xyz-hacker/layouts/404.en.html new file mode 100644 index 0000000..6ed4892 --- /dev/null +++ b/themes/danix-xyz-hacker/layouts/404.en.html @@ -0,0 +1,151 @@ +{{ define "main" }} + + + + +
+
+
+ +

+ 404 +

+ + +

+ {{ i18n "notFound" }} +

+ +

+ {{ i18n "notFoundMessage" }} +

+ + +
+
+ + +
+
+ +
+
+ {{ i18n "noSearchResults" }} +
+
+ + +
+

{{ i18n "recentArticles" }}

+
+ {{ range first 5 (where .Site.RegularPages "Section" "articles") }} + + {{ end }} +
+
+ + + + + +
+ +
+ + +
+ +
+ + +
+

{{ i18n "easterEggTitle" }}

+ +
+ + + +
+ + +
+
+
+
+
+ +{{ end }} diff --git a/themes/danix-xyz-hacker/layouts/404.it.html b/themes/danix-xyz-hacker/layouts/404.it.html new file mode 100644 index 0000000..805b19a --- /dev/null +++ b/themes/danix-xyz-hacker/layouts/404.it.html @@ -0,0 +1,151 @@ +{{ define "main" }} + + + + +
+
+
+ +

+ 404 +

+ + +

+ {{ i18n "notFound" }} +

+ +

+ {{ i18n "notFoundMessage" }} +

+ + +
+
+ + +
+
+ +
+
+ {{ i18n "noSearchResults" }} +
+
+ + +
+

{{ i18n "recentArticles" }}

+
+ {{ range first 5 (where .Site.RegularPages "Section" "articles") }} + + {{ end }} +
+
+ + + + + +
+ +
+ + +
+ +
+ + +
+

{{ i18n "easterEggTitle" }}

+ +
+ + + +
+ + +
+
+
+
+
+ +{{ end }} diff --git a/themes/danix-xyz-hacker/layouts/_default/404.html b/themes/danix-xyz-hacker/layouts/_default/404.html deleted file mode 100644 index 4b313cd..0000000 --- a/themes/danix-xyz-hacker/layouts/_default/404.html +++ /dev/null @@ -1,155 +0,0 @@ -{{ define "main" }} - - - - -
-
-
- -

- 404 -

- - -

- {{ i18n "notFound" }} -

- -

- {{ i18n "notFoundMessage" }} -

- - -
-
- - -
-
- -
-
- {{ i18n "noSearchResults" }} -
-
- - -
-

{{ i18n "recentArticles" }}

-
- {{ range first 5 (where .Site.RegularPages "Section" "articles") }} - - {{ end }} -
-
- - -
- {{ $homeLink := "/" }} - {{ if eq .Lang "it" }} - {{ $homeLink = "/it/" }} - {{ end }} - - {{ i18n "goHome" }} - - - {{ i18n "browseArticles" }} - - - {{ i18n "contactSupport" }} - -
- - -
- -
- - -
- -
- - -
-

{{ i18n "easterEggTitle" }}

- -
- - - -
- - -
-
-
-
-
- -{{ end }} -- cgit v1.2.3