From c306a9d67c42890cf9ba66d0f8ef39a39b9b1d60 Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Fri, 15 Sep 2023 13:14:33 +0200 Subject: [PATCH] fix: give `` higher priority than nuxt.config --- module/src/runtime/plugin/defaults.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/src/runtime/plugin/defaults.ts b/module/src/runtime/plugin/defaults.ts index c4263e7d..16421c99 100644 --- a/module/src/runtime/plugin/defaults.ts +++ b/module/src/runtime/plugin/defaults.ts @@ -58,6 +58,11 @@ export default defineNuxtPlugin({ useHead({ link: [{ rel: 'canonical', href: canonicalUrl }], }) + if (siteConfig?.currentLocale) { + useServerHead({ + htmlAttrs: {lang: () => siteConfig.currentLocale}, + }) + } // TODO support SPA useServerHead({