Skip to content

Commit

Permalink
docs: add meta og:site_name & update og:title (#16672)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored May 17, 2024
1 parent 2b61cc3 commit 31f526f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export default defineConfig({
['meta', { property: 'og:image', content: ogImage }],
['meta', { property: 'og:url', content: ogUrl }],
['meta', { property: 'og:description', content: ogDescription }],
['meta', { property: 'og:site_name', content: 'vitejs' }],
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
['meta', { name: 'twitter:site', content: '@vite_js' }],
['meta', { name: 'theme-color', content: '#646cff' }],
Expand Down Expand Up @@ -341,10 +342,10 @@ export default defineConfig({
.replace(/\/index\.md$/, '/')
.replace(/\.md$/, '/')
pageData.frontmatter.head ??= []
pageData.frontmatter.head.unshift([
'link',
{ rel: 'canonical', href: canonicalUrl },
])
pageData.frontmatter.head.unshift(
['link', { rel: 'canonical', href: canonicalUrl }],
['meta', { property: 'og:title', content: pageData.title }],
)
return pageData
},
markdown: {
Expand Down

0 comments on commit 31f526f

Please sign in to comment.