Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cube-docs-redirects — verified shim for CORE-674

Ready-to-push contents for the new repository that replaces the docs/ folder in cube-js/cube. Everything here has been built and verified; nothing is a sketch.

What it does

Serves the cross-domain redirects from the retired cube.dev/docs site to docs.cube.dev, and nothing else. next.config.mjs loads the frozen 772-rule table and prepends the / rule; app/ is a two-file stub because Next 16 refuses to build without a root page.

Verification

Built with BASE_PATH=/docs npx next build (Next 16.2.12, 22 packages, ~700 ms) and served with next start, then compared against live cube.dev:

  • All 771 enumerated rules replayed against the shim: 771/771 return the exact destination in the table. The three trailing-slash-only sources (/cloud/access-control/, /cloud/dev-tools/alerts/, /workspace/sso/) were fixed in CORE-707 — the slash was stripped from each source, so both forms now resolve: the slash-less form 308s straight to the destination, and the trailing-slash form 308s to the slash-less form and on from there.

  • 63 probes (60 random enumerated rules + 3 catch-all classes) compared local vs production: 0 differences.

  • The three acceptance paths from the plan match production exactly:

    Path Result
    /docs 308 → https://docs.cube.dev/docs/introduction
    /docs/product/administration/sso/okta 308 → https://docs.cube.dev/admin/sso/okta/saml
    /docs/product/anything/else 308 → https://docs.cube.dev/docs/introduction

Notes on the contents

  • redirects-new-docs.json (772 rules) is the only table loaded at runtime. The /product/:path* catch-all is last (index 771), so enumerated rules win.
  • redirects.json (454 rules) is not loaded — it was the generator's input, not a live rule set. Carried along only because the table can never be regenerated once docs/content/ is gone, so keeping the input alongside the output costs 69 KB and preserves the provenance.
  • BASE_PATH=/docs must be set in the Vercel project, as it is today for cube-docs-prod.

Before docs/ can be deleted

Two dependencies that the deletion PR must handle:

  1. README.md:3 serves the repo's hero logo from docs/content/cube-core-logo.png (live, HTTP 200). Relocate the PNG or the GitHub front page loses its image.
  2. CODEOWNERS:28 has a /docs/ entry, and two scripts in docs-mintlify/scripts/ (build_old_site_redirects.py, copy_content.py) default to paths under ../docs/ and become dead code. migrate_redirects.py survives — it takes its input path as a CLI argument and hardcodes nothing into docs/.

About

Cross-domain redirects from the retired cube.dev/docs site to docs.cube.dev

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages