fix(seo): make the sitemap canonical-only, healthy, and testable
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- documentation, testing, web-dev
Hướng nghiên cứu
Bắt đầu trong src/utils/sitemap.ts và xem xét cách các đường dẫn manifest, chuyển hướng, trang showcase và các giá trị lastmod được đưa vào sitemap được tạo. Thêm phần xác thực contract sitemap được yêu cầu và độ bao phủ unit test cho việc lọc đường dẫn và chuẩn hóa canonical; hoàn tất có nghĩa là các mục production là các URL 200, có thể lập chỉ mục, tự canonical, không có URL placeholder và không có artifact bị cấm.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.1k
- Fork
- 401
- Merge trung bình
- 18 giờ 44 phút
- Pull request đã merge (30 ngày)
- 55
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/tanstack.com
-
source-audit
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
TanStack/tanstack.com#1195 ·
-
source-audit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
TanStack/tanstack.com#1194 · 2 bình luận ·
-
source-audit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
TanStack/tanstack.com#1177 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
TanStack/tanstack.com#1059 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
TanStack/tanstack.com#1047 ·
Tất cả issue của TanStack/tanstack.com
Issue tương tự
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Mend: dependency security vulnerability untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100