diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-17 11:58:02 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-17 11:58:02 +0200 |
| commit | 94a11324999f07feff138364633e8442947b628a (patch) | |
| tree | fe2f7d918a1829f504f7e5bdba7cffea2e1816f1 /themes/danix-xyz-hacker/assets | |
| parent | 22f60cd3a437d369328f0eb75542602460c526d7 (diff) | |
| download | danixxyz-94a11324999f07feff138364633e8442947b628a.tar.gz danixxyz-94a11324999f07feff138364633e8442947b628a.zip | |
fix: use language-specific 404 layouts for proper i18n support
Created separate 404.html layouts in themes/danix-xyz-hacker/layouts/it/ and
themes/danix-xyz-hacker/layouts/en/ with hardcoded language-specific links.
Hugo automatically routes language requests to the correct layout, enabling
proper i18n context and translations. Removed generic 404.html and all
JavaScript detection hacks.
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 | 23 |
1 files changed, 0 insertions, 23 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 cec60bd..e86af02 100644 --- a/themes/danix-xyz-hacker/assets/js/not-found-page.js +++ b/themes/danix-xyz-hacker/assets/js/not-found-page.js @@ -31,29 +31,6 @@ document.addEventListener('alpine:init', () => { } })); - Alpine.data('notFoundNav', () => { - const isItalian = window.location.pathname.startsWith('/it/'); - return { - get homeLink() { - return isItalian ? '/it/' : '/'; - }, - get articlesLink() { - return isItalian ? '/it/articles/' : '/articles/'; - }, - get contactLink() { - return isItalian ? '/it/is/here/' : '/is/here/'; - }, - goHome() { - window.location.href = this.homeLink; - }, - goArticles() { - window.location.href = this.articlesLink; - }, - goContact() { - window.location.href = this.contactLink; - } - }; - }); console.log('notFoundPage Alpine component registered'); }); |
