Skip to content

Commit

Permalink
feat: support twitter site config
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Sep 9, 2023
1 parent 5a90e83 commit 807f774
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion module/src/runtime/plugin/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,16 @@ export default defineNuxtPlugin({
ogSiteName: siteConfig.name,
description: siteConfig.description,
// extra og are set by InferSeoMeta plugin
})
}
if (siteConfig.twitter) {
// id must have the @ in it
const id = siteConfig.twitter.startsWith('@')
? siteConfig.twitter
: `@${siteConfig.twitter}`
seoMeta.twitterCreator = id
seoMeta.twitterSite = id
}
useSeoMeta(seoMeta, minimalPriority)

// init vendors
defineOgImage()
Expand Down

0 comments on commit 807f774

Please sign in to comment.