fix(seo): make the sitemap canonical-only, healthy, and testable
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 58/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript
- 领域
- documentation, testing, web-dev
调研方向
从 src/utils/sitemap.ts 开始,检查 manifest 路径、重定向、showcase 页面和 lastmod 值如何进入生成的 sitemap。添加所请求的 sitemap contract 验证,以及路径过滤和 canonical 规范化的单元测试覆盖;完成的标准是 production 条目均为 200、可建立索引、自 canonical、非占位符 URL,且不包含不允许的 artifact。
由索引模型根据 Issue 内容生成。
描述
Problem
The production sitemap currently contains 3,245 URLs. A live audit found several categories of non-canonical or unhealthy entries:
- 189 Charts catalog URLs use trailing slashes and immediately redirect to the no-trailing-slash canonical.
- /showcase redirects to a default query-string URL before canonicalizing back to /showcase.
- Four /drafts/ URLs and two README URLs are included.
- Draft and README examples currently return 200 pages headed Content temporarily unavailable.
- A stratified check of 160 sitemap entries found 23 redirects and one 404, including stale DB reference paths that redirect to a parent reference page or no longer resolve.
- Only 77 entries currently contain lastmod values; docs and most other content do not.
- Approved showcase detail pages are not included even though later showcase pagination is currently noindex/nofollow.
Google says sitemap entries should be the canonical URLs the site wants indexed: https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap
Relevant generation code: src/utils/sitemap.ts
Required changes
- Emit only URLs that return 200, are indexable, and self-canonicalize.
- Normalize Charts catalog entries to the production no-trailing-slash form.
- Exclude drafts, *.draft paths, README files, temporary-unavailable placeholders, hidden libraries, and other non-public docs artifacts.
- Apply docs redirect resolution before adding manifest paths to the sitemap.
- Remove stale or missing generated-reference paths.
- Reconcile /showcase so the sitemap entry does not require an avoidable redirect.
- Add approved showcase detail pages if they are intended for organic discovery.
- Keep query-string URLs only when they represent an intentionally indexable canonical page, such as the previous-partners directory.
- Add accurate lastmod values where the source provides a real meaningful modification date; do not synthesize timestamps on every request.
Automated validation
Add a sitemap contract checker that can validate generated entries and optionally check a deployed base URL.
For every sitemap URL, verify:
- Final status is 200 without following a redirect.
- Exactly one canonical link exists.
- Canonical equals the sitemap URL after consistent URL normalization.
- No robots noindex directive is present.
- The page is not a temporary-unavailable or error placeholder.
- The URL has no disallowed draft, README, embed, account, or admin pattern.
Acceptance criteria
- Production sitemap contains zero redirecting URLs.
- Production sitemap contains zero 4xx or 5xx URLs.
- Production sitemap contains zero noindex URLs.
- Every entry is self-canonical.
- Drafts and repository-maintenance documents are absent.
- Charts catalog URLs use the same trailing-slash policy as their canonical pages.
- Unit tests cover path filtering and canonical normalization.
- A CI or release-time check prevents regressions in the sitemap contract.
- 主要语言
- TypeScript
- 星标
- 1.1k
- 派生
- 401
- 平均合并
- 18 小时 44 分钟
- 30 天内合并 PR
- 55
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/tanstack.com 的其他 Issue
-
source-audit
难度 1/5 1 小时以内 新手友好度 84/100
TanStack/tanstack.com#1195 ·
-
source-audit
难度 2/5 1-3 小时 新手友好度 68/100
TanStack/tanstack.com#1194 · 2 条评论 ·
-
source-audit
难度 2/5 1-3 小时 新手友好度 72/100
TanStack/tanstack.com#1177 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 64/100
TanStack/tanstack.com#1059 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
TanStack/tanstack.com#1047 ·
查看 TanStack/tanstack.com 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
0xMiden/bridge-portal#132 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
area:tools bug good first issue help wanted priority:P2
难度 2/5 1-3 小时 新手友好度 90/100
TaewoooPark/Motifcode#14 ·
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
newrelic-experimental/preflight#793 · 1 条评论 ·