From d7ad13d26c7ddf5337f0b030f4c77fd1c83975ad Mon Sep 17 00:00:00 2001 From: tycon Date: Wed, 15 Oct 2025 10:27:28 +0800 Subject: [PATCH] feat: Implement SEO optimizations and card hover effect --- docs/.vitepress/config.js | 23 ++++++++++++++++++++++- docs/.vitepress/styles/custom.css | 8 ++++++++ vercel.json | 15 +++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 docs/.vitepress/styles/custom.css create mode 100644 vercel.json diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 2357e487..92c8f8c5 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -45,10 +45,31 @@ function getSidebar(dir, sidebarTitle) { export default defineConfig({ 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', description: 'A collection of system prompts for various AI tools.', + lastUpdated: true, // Enable last updated timestamp + sitemap: { + hostname: 'https://promptsdoc.itycon.cn' + }, themeConfig: { logo: '/logo.svg', diff --git a/docs/.vitepress/styles/custom.css b/docs/.vitepress/styles/custom.css new file mode 100644 index 00000000..f1ac8344 --- /dev/null +++ b/docs/.vitepress/styles/custom.css @@ -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% */ +} \ No newline at end of file diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..12a547f7 --- /dev/null +++ b/vercel.json @@ -0,0 +1,15 @@ +{ + "redirects": [ + { + "source": "/(.*)", + "destination": "https://promptsdoc.itycon.cn/$1", + "permanent": true, + "has": [ + { + "type": "host", + "value": "promptsdoc.vercel.app" + } + ] + } + ] +} \ No newline at end of file