Skip to content

fix(docs): publish current documentation at root - #873

Merged
LinoGiger merged 2 commits into
mainfrom
fix(docs)/publish-current-documentation-at-root
Sep 15, 2026
Merged

LinoGiger merged 2 commits into
mainfrom
fix(docs)/publish-current-documentation-at-root

Conversation

@RapidPoseidon

Copy link
Copy Markdown
Contributor

What

Re-applies #871 (publish the current documentation at https://docs.rapidata.ai/, no version prefix) with the fix for why the first attempt rendered unstyled.

Why the first deploy looked broken

The build was fine. GitHub Pages serves HTML with cache-control: max-age=600. The first root deploy replaced every page under /latest/ and /3.x/ with a redirect stub and deleted the assets under those prefixes. For up to ten minutes browsers and the CDN kept serving the cached full pages from /latest/..., whose stylesheets (/latest/assets/stylesheets/main.*.css) were now 404. Result: unstyled pages until the cache expired, which looked like a broken build and triggered the revert.

Fix

prepare_docs_site.py now mirrors the complete build (assets, media, search index, markdown, llms files) into latest/ and 3.x/ before overwriting their HTML pages with redirect stubs. A stale cached alias page therefore still finds its assets and renders normally, and a fresh request is redirected to the root URL.

Verified locally by building main, running the script against the real gh-pages tree, then rendering the pre-deploy /3.x/quickstart/ HTML against the new tree in headless Chrome: fully styled.

After merge

  1. Run Deploy Documentation manually from main (no inputs any more).
  2. Root pages serve the current docs; /latest/... and /3.x/... redirect to the same path at the root; obsolete paths (/starting_page/, /improve_order_quality/, old *_order examples) redirect to their replacement or /migration/; /2.x/ is kept as-is.

Includes the #872 developer-portal fix implicitly: the copy step it patched no longer exists.

🔗 Session: https://poseidon.rapidata.internal/chat/session-41cd4687

🤖 Generated with Claude Code

RapidPoseidon and others added 2 commits September 15, 2026 12:09
GitHub Pages caches HTML for ten minutes. The first root deploy replaced
every page under latest/ and 3.x/ with a redirect stub and deleted the
alias assets, so cached alias pages loaded 404 stylesheets and rendered
unstyled. Mirror the full build into each alias before writing the stubs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: lino@rapidata.ai <68745352+LinoGiger@users.noreply.github.com>
@LinoGiger
LinoGiger marked this pull request as ready for review September 15, 2026 12:16
@LinoGiger
LinoGiger self-requested a review as a code owner September 15, 2026 12:16
@LinoGiger
LinoGiger merged commit 8f55103 into main Sep 15, 2026
3 checks passed
@LinoGiger
LinoGiger deleted the fix(docs)/publish-current-documentation-at-root branch September 15, 2026 12:16
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