From 9560a65c61a217bfd9c5548e165eff8fa4c98c37 Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Fri, 15 Sep 2023 13:15:17 +0200 Subject: [PATCH] fix: provide all site config as template params and render client-side --- module/src/runtime/plugin/defaults.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/src/runtime/plugin/defaults.ts b/module/src/runtime/plugin/defaults.ts index 16421c99..1ce67ef7 100644 --- a/module/src/runtime/plugin/defaults.ts +++ b/module/src/runtime/plugin/defaults.ts @@ -55,6 +55,7 @@ export default defineNuxtPlugin({ title, }, minimalPriority) + // needs higher priority useHead({ link: [{ rel: 'canonical', href: canonicalUrl }], }) @@ -65,9 +66,8 @@ export default defineNuxtPlugin({ } // TODO support SPA - useServerHead({ - templateParams: { site: { name: siteConfig.name, url: siteConfig.url }, siteName: siteConfig.name }, - htmlAttrs: { lang: () => siteConfig?.currentLocale }, + useHead({ + templateParams: { site: siteConfig, siteName: siteConfig.name }, titleTemplate: '%s %separator %site.name', }, minimalPriority)