Skip to content

Commit fb48696

Browse files
author
jay.yang
committed
docs: enhance SEO and social media metadata in VitePress configuration
1 parent 42e01b6 commit fb48696

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

docs/.vitepress/config/shared.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,68 @@ export const shared = defineConfig({
7373

7474
/* prettier-ignore */
7575
head: [
76+
// base
7677
['link', { rel: 'icon', type: 'image/svg+xml', href: `${process.env.NODE_ENV === 'production' ? '/vue-hooks-plus/logo.svg' : '/logo.svg'}` }],
7778
['link', { rel: 'icon', type: 'image/png', href: `${process.env.NODE_ENV === 'production' ? '/vue-hooks-plus/logo.png' : '/logo.png'}` }],
7879
['meta', { name: 'theme-color', content: '#000000' }],
80+
81+
// seo
82+
['meta', { name: 'description', content: 'High performance & Simplicity Vue3 Hooks library.' }],
83+
['meta', { name: 'keywords', content: 'vue, hooks, vue-hooks, vue-hooks-plus, composition-api, vue3, frontend, web, javascript, typescript, SSR' }],
84+
85+
// og
7986
['meta', { property: 'og:type', content: 'website' }],
8087
['meta', { property: 'og:locale', content: 'en' }],
8188
['meta', { property: 'og:title', content: 'VueHooks plus | High-performance Hooks Library for Vue' }],
89+
['meta', { property: 'og:description', content: 'A high-performance, comprehensive, and reliable Vue 3 hooks library.' }],
8290
['meta', { property: 'og:site_name', content: 'VueHooks plus' }],
8391
['meta', { property: 'og:url', content: 'https://inhiblabcore.github.io/vue-hooks-plus/' }],
92+
['meta', { property: 'og:image', content: 'https://inhiblabcore.github.io/vue-hooks-plus/logo.png' }],
93+
94+
// twitter
95+
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
96+
['meta', { name: 'twitter:site', content: '@Yong_Git' }],
97+
['meta', { name: 'twitter:image', content: 'https://inhiblabcore.github.io/vue-hooks-plus/logo.png' }],
98+
99+
// hreflang
100+
['link', { rel: 'alternate', hreflang: 'x-default', href: 'https://inhiblabcore.github.io/vue-hooks-plus/' }],
101+
['link', { rel: 'alternate', hreflang: 'en-us', href: 'https://inhiblabcore.github.io/vue-hooks-plus/' }],
102+
['link', { rel: 'alternate', hreflang: 'zh-cn', href: 'https://inhiblabcore.github.io/vue-hooks-plus/zh/' }],
103+
104+
// script
84105
['script', { src: 'https://cdn.usefathom.com/script.js', 'data-site': 'AZBRSFGG', 'data-spa': 'auto', defer: '' }],
85106
[
86107
'script',
87108
{
88109
src: process.env.NODE_ENV === 'production' ? '/vue-hooks-plus/sponsor/sponsor.iife.js' : '/sponsor/sponsor.iife.js',
89110
defer: ''
90111
}
112+
],
113+
[
114+
'script',
115+
{ type: 'application/ld+json' },
116+
JSON.stringify({
117+
'@context': 'https://schema.org',
118+
'@type': 'WebSite',
119+
'name': 'VueHooks plus',
120+
'url': 'https://inhiblabcore.github.io/vue-hooks-plus/',
121+
'description': 'A high-performance, comprehensive, and reliable Vue 3 hooks library.',
122+
'keywords': ['vue', 'hooks', 'vue-hooks', 'vue-hooks-plus', 'composition-api', 'vue3', 'frontend', 'web', 'javascript', 'typescript', 'SSR'],
123+
'potentialAction': {
124+
'@type': 'SearchAction',
125+
'target': 'https://inhiblabcore.github.io/vue-hooks-plus/?q={search_term_string}',
126+
'query-input': 'required name=search_term_string'
127+
},
128+
'publisher': {
129+
'@type': 'Organization',
130+
'name': 'InhiblabCore',
131+
'url': 'https://github.com/InhiblabCore',
132+
'logo': {
133+
'@type': 'ImageObject',
134+
'url': 'https://inhiblabcore.github.io/vue-hooks-plus/logo.png'
135+
}
136+
}
137+
})
91138
]
92139
],
93140

0 commit comments

Comments
 (0)