Skip to content

docs(platform): publish versioned interactive API reference (Swagger UI)#144

Merged
tamalsaha merged 1 commit into
masterfrom
api-html-interactive-reference
Jul 14, 2026
Merged

docs(platform): publish versioned interactive API reference (Swagger UI)#144
tamalsaha merged 1 commit into
masterfrom
api-html-interactive-reference

Conversation

@tamalsaha

@tamalsaha tamalsaha commented Jul 14, 2026

Copy link
Copy Markdown
Member

What

Publishes the generated api.html (self-contained Swagger UI, spec inlined) as a per-version interactive API reference.

  • api.html → moved into a leaf bundle at docs/platform/api/reference/api.html, so the aggregator copies it into each versioned docs tree.
  • docs/platform/api/reference/index.md → tiny stub (type: swagger) that routes the page through a raw-passthrough layout.
  • docs/platform/api/README.md → updates the existing OpenAPI paragraph to link the published interactive viewer (replacing the stale "available at the repository root" note). Not added to the left sidebar.

Result — each release serves the exact standalone Swagger UI at:

https://kubedb.com/docs/platform/<version>/api/reference/

Why a leaf bundle + passthrough layout

.html is a Hugo renderable content type: dropped into content/ it renders as a wrapped page at the wrong URL; as a plain resource Hugo won't give it a permalink to publish. Making it a resource of a leaf bundle and emitting .Content from a no-baseof layout serves it byte-for-byte, while keeping api.html pristine (no front matter injected) so the generator can keep overwriting it.

Companion (land first)

Requires the passthrough layout: kubedb/website#407.

Verification

Simulated the aggregator into content/docs/platform/v2026.7.10/... and built with the real hugo-product-theme (Hugo 0.128.2): the page renders byte-identical (cmp) to source api.html, no theme chrome.

Note

api.html now lives under docs/, so the liche link check will see its https://unpkg.com/... CDN links. If CI flags them, add .*unpkg.com.* to the -x exclude list in .github/workflows/ci.yml.

kodiak-appscode[bot]
kodiak-appscode Bot previously approved these changes Jul 14, 2026
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit e259f00):

https://kubedb-v2-hugo--pr144-api-html-interactive-jepcjslc.web.app

(expires Tue, 21 Jul 2026 10:01:37 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0f29ae8ae0bd54a99bf2b223b6833be47acd5943

Move the generated api.html into a leaf bundle under docs/platform/api/reference/
so the aggregator copies it into each versioned docs tree. A tiny index.md stub
routes it through a raw-passthrough layout (type: swagger) that serves the
self-contained Swagger UI verbatim at /docs/platform/<version>/api/reference/.
Link it from the API README's OpenAPI paragraph (not the sidebar).

Requires the companion layouts/swagger/single.html in the website repo.

Signed-off-by: Tamal Saha <tamal@appscode.com>
@tamalsaha
tamalsaha merged commit 78f90f9 into master Jul 14, 2026
6 checks passed
@tamalsaha
tamalsaha deleted the api-html-interactive-reference branch July 14, 2026 10:07
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