feat: Implement SEO optimizations and card hover effect

This commit is contained in:
tycon 2025-10-15 10:27:28 +08:00
parent 60ddd120c4
commit d7ad13d26c
3 changed files with 45 additions and 1 deletions

View File

@ -45,10 +45,31 @@ function getSidebar(dir, sidebarTitle) {
export default defineConfig({ export default defineConfig({
head: [ head: [
['link', { rel: 'icon', href: '/logo.svg' }] ['link', { rel: 'icon', href: '/logo.svg' }],
// Open Graph / Facebook Meta Tags
['meta', { property: 'og:type', content: 'website' }],
['meta', { property: 'og:url', content: 'https://promptsdoc.itycon.cn/' }], // Use the provided hostname
['meta', { property: 'og:title', content: 'AI System Prompts Hub' }], // Uses global title
['meta', { property: 'og:description', content: 'A collection of system prompts for various AI tools.' }], // Uses global description
['meta', { property: 'og:image', content: 'https://promptsdoc.itycon.cn/logo.svg' }], // Placeholder, consider a more descriptive image
// Twitter Meta Tags
['meta', { property: 'twitter:card', content: 'summary_large_image' }],
['meta', { property: 'twitter:url', content: 'https://promptsdoc.itycon.cn/' }], // Use the provided hostname
['meta', { property: 'twitter:title', content: 'AI System Prompts Hub' }], // Uses global title
['meta', { property: 'twitter:description', content: 'A collection of system prompts for various AI tools.' }], // Uses global description
['meta', { property: 'twitter:image', content: 'https://promptsdoc.itycon.cn/logo.svg' }], // Placeholder, consider a more descriptive image
// Canonical URL
['link', { rel: 'canonical', href: 'https://promptsdoc.itycon.cn' + (typeof window !== 'undefined' ? window.location.pathname : '') }],
// Import custom styles
['link', { rel: 'stylesheet', href: '/.vitepress/styles/custom.css' }],
], ],
title: 'AI System Prompts Hub', title: 'AI System Prompts Hub',
description: 'A collection of system prompts for various AI tools.', description: 'A collection of system prompts for various AI tools.',
lastUpdated: true, // Enable last updated timestamp
sitemap: {
hostname: 'https://promptsdoc.itycon.cn'
},
themeConfig: { themeConfig: {
logo: '/logo.svg', logo: '/logo.svg',

View File

@ -0,0 +1,8 @@
/* Styles for VitePress Home Features cards */
article.box {
transition: transform 0.3s ease-in-out;
}
article.box:hover {
transform: scale(1.05); /* Scales up by 5% */
}

15
vercel.json Normal file
View File

@ -0,0 +1,15 @@
{
"redirects": [
{
"source": "/(.*)",
"destination": "https://promptsdoc.itycon.cn/$1",
"permanent": true,
"has": [
{
"type": "host",
"value": "promptsdoc.vercel.app"
}
]
}
]
}