diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-17 11:49:24 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-17 11:49:24 +0200 |
| commit | 1cab4424a5c6dd2aeb453d299b6a2f12a840599d (patch) | |
| tree | 6f4b1bf3b575f38bd4219da64f839a02a85438e9 /themes/danix-xyz-hacker/assets | |
| parent | c353452c544a3184ec66e05fa1743a592543a4d0 (diff) | |
| download | danixxyz-1cab4424a5c6dd2aeb453d299b6a2f12a840599d.tar.gz danixxyz-1cab4424a5c6dd2aeb453d299b6a2f12a840599d.zip | |
fix: use Hugo content-based 404 pages for proper multilingual support
Created language-specific 404 pages (content/en/404.md and content/it/404.md)
instead of using JavaScript detection. Hugo now properly routes 404 errors to
the correct language context, allowing .Lang and i18n to work correctly.
Removed JS language detection hack.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'themes/danix-xyz-hacker/assets')
| -rw-r--r-- | themes/danix-xyz-hacker/assets/js/not-found-page.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/themes/danix-xyz-hacker/assets/js/not-found-page.js b/themes/danix-xyz-hacker/assets/js/not-found-page.js index 78e3591..6ec8895 100644 --- a/themes/danix-xyz-hacker/assets/js/not-found-page.js +++ b/themes/danix-xyz-hacker/assets/js/not-found-page.js @@ -31,17 +31,5 @@ document.addEventListener('alpine:init', () => { } })); - Alpine.data('notFoundNav', () => ({ - get homeLink() { - return window.currentLang === 'it' ? '/it/' : '/'; - }, - get articlesLink() { - return window.currentLang === 'it' ? '/it/articles/' : '/articles/'; - }, - get contactLink() { - return window.currentLang === 'it' ? '/it/is/here/' : '/is/here/'; - } - })); - console.log('notFoundPage Alpine component registered'); }); |
