Skip to content

docs: auto-generate API Reference nav from Speakeasy service pages#383

Merged
mattapperson merged 1 commit into
mainfrom
docs-nav-autogen
Jul 1, 2026
Merged

docs: auto-generate API Reference nav from Speakeasy service pages#383
mattapperson merged 1 commit into
mainfrom
docs-nav-autogen

Conversation

@mattapperson

Copy link
Copy Markdown
Collaborator

Summary

Removes the need to hand-maintain the API Reference page list in docs/docs.json. New API sections appear in the sidebar automatically.

  • scripts/gen-docs-nav.sh — globs docs/sdks/<tag>/README.mdx and rewrites only the API Reference group's pages (alphabetical). Idempotent; errors if the group is missing; preserves $schema, theme, colors, Getting Started. Needs bash + jq (preinstalled on ubuntu runners). Identical to the script in the typescript-sdk and go-sdk PRs.
  • .github/workflows/docs-nav.yaml — standalone workflow; runs the script and commits docs.json when docs/sdks/** changes. Python's docs regenerate via the reusable sdk-generation-action (no local speakeasy run step to hook), so a standalone workflow is the right seam here.
  • docs/docs.json — pages re-sorted alphabetically by the script.

Verified locally

  • 27 pages, alphabetical ✓ · idempotent ✓ · preserves non-nav config ✓

Test plan

  • On a docs-changing PR, confirm docs-nav runs and commits an updated docs.json when tags change
  • Confirm sidebar renders correctly after deploy

Adds scripts/gen-docs-nav.sh (rewrites the "API Reference" group in
docs/docs.json from docs/sdks/<tag>/README.mdx, alphabetical, idempotent)
and a standalone .github/workflows/docs-nav.yaml that runs it and commits
docs.json when docs/sdks/** changes. New API sections appear in the sidebar
automatically — no manual docs.json edits.

Python's docs regenerate via the reusable sdk-generation-action (no local
`speakeasy run` step to hook), so nav generation is a standalone workflow
here rather than an inline step.
@mintlify

mintlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
openrouter-production 🟡 Building Jul 1, 2026, 2:57 PM

@mattapperson mattapperson merged commit 87f0aa3 into main Jul 1, 2026
2 checks passed
@mattapperson mattapperson deleted the docs-nav-autogen branch July 1, 2026 14:59
@mintlify

mintlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
openrouter-staging 🟡 Building Jul 1, 2026, 2:59 PM

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