Skip to content

Commit

Permalink
docs: correctly set site name meta tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdvlpr committed Dec 19, 2024
1 parent a9eda4f commit 5874d4e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
23 changes: 23 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,29 @@ export default defineConfig({

pageData.frontmatter.head ??= [];
pageData.frontmatter.head.push(
// Site name
[
'meta',
{
content: messages[isEnglish ? 'en' : messageLocale].title,
name: 'application-name',
},
],
[
'meta',
{
content: messages[isEnglish ? 'en' : messageLocale].title,
name: 'apple-mobile-web-app-title',
},
],
[
'meta',
{
content: messages[isEnglish ? 'en' : messageLocale].title,
property: 'og:site_name',
},
],

// Page url
['link', { href: canonicalUrl, rel: 'canonical' }],
['meta', { content: canonicalUrl, property: 'og:url' }],
Expand Down
5 changes: 0 additions & 5 deletions docs/utils/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ const mapLocale = (
} => ({
description: msg.description,
head: [
// Site name
['meta', { content: msg.title, name: 'application-name' }],
['meta', { content: msg.title, name: 'apple-mobile-web-app-title' }],
['meta', { content: msg.title, property: 'og:site_name' }],

// Site description
['meta', { content: msg.description, property: 'og:description' }],
['meta', { content: msg.description, name: 'twitter:description' }],
Expand Down

0 comments on commit 5874d4e

Please sign in to comment.