feat(seo): add canonical, OG/Twitter tags, JSON-LD schema, robots.txt and sitemap - #91
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更范围与目的
https://sm.shadow.wang/补齐基础 SEO、GEO 结构化数据与社交分享卡片:index.html:添加<link rel="canonical" href="https://sm.shadow.wang/">privacy-policy.html:添加<link rel="canonical" href="https://sm.shadow.wang/privacy">og:type、og:url、og:title、og:description、og:image(指向/icons/icon-512.png)、og:site_name与og:locale,确保在微信、朋友圈、即刻、X 等平台分享时展现富媒体卡片与图标。twitter:card为summary。index.html输出WebApplication(分类为EducationalApplication)Schema。sameAs数组连接https://shadow.wang/zh/products/shadow-mate与https://github.com/WardLu/shadow-mate,打通 Shadow Portal 与开源仓库实体互认。scripts/check.mjs静态检查,允许application/ld+json类型的内联元数据脚本。public/robots.txt:允许公开爬取,并声明 sitemap 路径。public/sitemap.xml:包含首页与隐私政策页。https://shadow.wang/zh与产品详情页https://shadow.wang/zh/products/shadow-mate。门禁验证
npm run check:通过(静态检查与 marker 校验通过)npm run public:check:通过(无私有文件或密钥泄露)npm run security:check:通过(安全扫描通过)npm run build:通过(dist 构建正常,Vite 打包通过)npm run test:fast:通过(24 个测试文件,193 个单元测试全部通过)