Skip to content

Use ReadMe page slugs in sitemap.xml - #88

Merged
christophdb merged 1 commit into
v6.2from
fix-sitemap-readme-slugs
Oct 5, 2026
Merged

christophdb merged 1 commit into
v6.2from
fix-sitemap-readme-slugs

Conversation

@christophdb

Copy link
Copy Markdown
Member

Problem

custom-domain/generate.py builds sitemap URLs as /reference/<operationId lowercased>. ReadMe appends -1, -2, … to the slug when the same operationId exists in more than one API definition (e.g. deleteBase in user, team admin and system admin operations).

Result for the deployed v6.2 sitemap (checked 2026-10-05):

  • 16 of 363 URLs return 404 (e.g. /reference/listcolumns, real page: /reference/listcolumns-1)
  • 65 ReadMe pages (…-1, …-2) are missing from the sitemap

Fix

The public reference page embeds the full sidebar as JSON (<script id="ssr-props">). Each endpoint entry contains the slug, the operationId (sync_unique) and the API definition ID (apiSetting), which matches the IDs in .github/readme-ids.json. generate.py now uses this mapping to get the actual slug per operation.

  • No new dependencies, no API key needed; version comes from readme-ids.json
  • If ReadMe can't be reached or the page structure changes, it falls back to the old behaviour with a warning, so the deploy doesn't break
  • llms.txt and llms-full.txt are unchanged

Tested (v6.2)

  • All 404 operations resolved; sitemap has 412 URLs and matches the ReadMe sidebar exactly (0 missing, 0 extra)
  • Spot checks return 200: listcolumns-1, appendcolumns-1, deletebase-2, listgroups-2, sendtoastnotification-1
  • Fallback tested with an unreachable host

Merging into v6.2 (default branch) runs the publish workflow and redeploys the corrected sitemap. The change should also go into v7.0 once that version is set up in ReadMe.

🤖 Generated with Claude Code

ReadMe appends -1, -2, ... to the slug when an operationId exists in more
than one API definition (e.g. deleteBase). The sitemap assumed the slug is
always the lowercase operationId, so 16 URLs returned 404 and 65 pages were
missing.

generate.py now reads the actual slugs from the sidebar data embedded in the
public reference page (operationId + API definition ID -> slug) and falls
back to the lowercase operationId with a warning if that fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@christophdb
christophdb merged commit c6d0ad9 into v6.2 Oct 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant