Skip to content

Commit

Permalink
fix: provide all site config as template params and render client-side
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Sep 15, 2023
1 parent c306a9d commit 9560a65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions module/src/runtime/plugin/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default defineNuxtPlugin({
title,
}, minimalPriority)

// needs higher priority
useHead({
link: [{ rel: 'canonical', href: canonicalUrl }],
})
Expand All @@ -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)

Expand Down

0 comments on commit 9560a65

Please sign in to comment.