Skip to content

Commit

Permalink
fix: support %siteName param
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Sep 13, 2023
1 parent 2578e1c commit fb23ea9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions module/src/runtime/plugin/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,18 @@ export default defineNuxtPlugin({

// TODO support SPA
useServerHead({
templateParams: { site: { name: siteConfig.name, url: siteConfig.url } },
// TODO integrate with nuxt/i18n
templateParams: { site: { name: siteConfig.name, url: siteConfig.url }, siteName: siteConfig.name },
htmlAttrs: { lang: () => siteConfig?.currentLocale },
titleTemplate: '%s %separator %site.name',
}, minimalPriority)

const seoMeta: UseSeoMetaInput = {
ogUrl: canonicalUrl,
// TODO integrate with nuxt/i18n
ogLocale: siteConfig.defaultLocale,
ogSiteName: siteConfig.name,
}
if (siteConfig.description) {
if (siteConfig.description)
seoMeta.description = siteConfig.description
}
if (siteConfig.twitter) {
// id must have the @ in it
const id = siteConfig.twitter.startsWith('@')
Expand Down

0 comments on commit fb23ea9

Please sign in to comment.