feat(seo): enhance seo and security configurations

- Remove static robots.txt and generate it dynamically during build
- Add security headers in vercel.json
- Improve structured data with BreadcrumbList and Course schema
- Make site URL dynamic based on deployment environment
- Enhance sitemap configuration with priority and changefreq
This commit is contained in:
sanbuphy
2026-03-02 21:28:16 +08:00
parent 6ed901a1e0
commit 7c1abbb407
3 changed files with 136 additions and 26 deletions
+46 -1
View File
@@ -2,5 +2,50 @@
"buildCommand": "npm run build",
"installCommand": "npm install",
"framework": "vitepress",
"outputDirectory": "docs/.vitepress/dist"
"outputDirectory": "docs/.vitepress/dist",
"headers": [
{
"source": "/(.*)",
"headers": [
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Referrer-Policy",
"value": "strict-origin-when-cross-origin"
},
{
"key": "Permissions-Policy",
"value": "camera=(), microphone=(), geolocation=()"
}
]
},
{
"source": "/sitemap.xml",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=86400, s-maxage=86400"
}
]
},
{
"source": "/robots.txt",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=86400, s-maxage=86400"
}
]
}
]
}