feat(website): bilingual i18n (English default, Danish at /da) + SEO

Add @nuxtjs/i18n: English is the default locale (no prefix), Danish lives
under /da (prefix_except_default). Both server-rendered and indexed with
hreflang alternates + per-locale canonical (useLocaleHead in app.vue).
First-visit browser language is auto-detected and remembered in the
i18n_redirected cookie (redirectOn root).

- Keep the hand-authored COPY object; useLang/useCopy now read the i18n
  locale; useLocalizeHref/useLangToggle added. Every internal link is
  localized so navigation stays in-locale.
- Clear segmented EN|DA language switcher (active segment filled) replacing
  the ambiguous "en · da" pill.
- SEO: useSeoMeta defaults are locale-aware; og:image switches per locale
  (English / Danish share card); favicon links; robots.txt + sitemap.xml;
  env-aware siteUrl/baseUrl (localhost in dev, dezky.eu in prod).
- Update the cookie policy (dezky-lang -> i18n_redirected).
- Gate the Traefik wss:443 HMR behind DEZKY_TRAEFIK so localhost dev/DevTools
  connect over plain ws (fixes the DevTools disconnect loop).
This commit is contained in:
Ronni Baslund
2026-06-06 20:46:26 +02:00
parent 3f0298e011
commit 7bee161ac1
24 changed files with 1812 additions and 107 deletions
+7 -5
View File
@@ -5,16 +5,18 @@
// home + scroll from a sub-page.
import { useRoute } from 'vue-router'
import { C } from '~/utils/landingTokens'
import { useTheme, useCopy, scrollToAnchor } from '~/composables/useLanding'
import { useTheme, useCopy, useLocalizeHref, scrollToAnchor } from '~/composables/useLanding'
const t = useTheme()
const copy = useCopy()
const route = useRoute()
const loc = useLocalizeHref()
const localePath = useLocalePath()
function onLink(e: MouseEvent, href: string) {
// In-page section link ("/#suite"): smooth-scroll in place when already on
// the homepage. Off-page, let NuxtLink route to "/#suite" — index.vue scrolls
// to the hash on mount.
if (href.includes('#') && route.path === '/') {
// the current locale's homepage. Off-page, let NuxtLink route to the
// localized home + hash — index.vue scrolls to the hash on mount.
if (href.includes('#') && route.path === localePath('/')) {
e.preventDefault()
scrollToAnchor(href.slice(href.indexOf('#')))
}
@@ -41,7 +43,7 @@ function onLink(e: MouseEvent, href: string) {
<div :style="{ fontFamily: '\'JetBrains Mono\', monospace', fontSize: '11px', color: 'rgba(10,10,10,0.45)', letterSpacing: '0.1em', textTransform: 'uppercase', marginBottom: '18px' }">{{ col[0] }}</div>
<div :style="{ display: 'flex', flexDirection: 'column', gap: '12px' }">
<NuxtLink
v-for="(link, j) in col[1]" :key="j" :to="link[1]"
v-for="(link, j) in col[1]" :key="j" :to="loc(link[1])"
:style="{ fontFamily: '\'Inter\', sans-serif', fontSize: '14px', color: 'rgba(10,10,10,0.78)' }"
@click="onLink($event, link[1])"
>{{ link[0] }}</NuxtLink>