Skip to content

chore(docs): keep docs-site links relative when syncing SDK READMEs - #413

Merged
bpapillon merged 1 commit into
mainfrom
sync-sdk-readmes-keep-relative-docs-links
Aug 11, 2026
Merged

chore(docs): keep docs-site links relative when syncing SDK READMEs#413
bpapillon merged 1 commit into
mainfrom
sync-sdk-readmes-keep-relative-docs-links

Conversation

@schematic-orbit

Copy link
Copy Markdown
Contributor

Follow-up to SchematicHQ/schematic-node#159.

The SDK READMEs link to docs.schematichq.com absolutely — they're read on
GitHub and on the package registries, so they have to. On the docs site those
same links are just internal pages, and someone had hand-edited the two of them
in the generated .mdx to be site-relative:

  • .../quickstart/account-setup#2-create-your-api-keys/quickstart/account-setup#2-create-your-api-keys
  • .../developer_resources/key_management/developer_resources/key_management

to_page_body() doesn't reproduce that, so every one of the six synced pages
reads as stale, and the next sync would silently revert the hand-edit. The
links would still resolve, but preview deploys would link out to production
docs instead of staying in the preview.

Teaches to_page_body() to rewrite https://docs.schematichq.com/X/X.

Verified locally against all six SDK repos:

BEFORE:  6 page(s) out of date  (csharp, go, java, nodejs, python, ruby)  exit=1
AFTER:   all six ok, no page edits                                        exit=0

That's the whole drift — those two links on each page were the only thing
making them stale.

Worth noting separately: --check isn't wired into any CI workflow, which is
why this went unnoticed. Adding it to a docs job would make future drift fail
loudly rather than get quietly reverted on the next Monday sync.

The SDK READMEs have to link to docs.schematichq.com absolutely — they
are read on GitHub and on the package registries. On the docs site those
are internal pages, so someone had hand-edited the two of them in the
generated .mdx to be site-relative. sync_sdk_readmes.py did not
reproduce that, so all six pages read as stale and the next sync would
have clobbered the hand-edit, sending preview deploys out to production
docs.

Teach to_page_body() to rewrite https://docs.schematichq.com/X to /X.
With this, --check goes from 6/6 STALE to 6/6 ok with no page edits.
@github-actions

Copy link
Copy Markdown
Contributor

@bpapillon bpapillon self-assigned this Aug 11, 2026
@bpapillon
bpapillon marked this pull request as ready for review August 11, 2026 04:59
@bpapillon
bpapillon merged commit 4dbb9f0 into main Aug 11, 2026
2 checks passed
@bpapillon
bpapillon deleted the sync-sdk-readmes-keep-relative-docs-links branch August 11, 2026 05:00
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.

2 participants