Skip to content

[Docs] Replace the Docusaurus site with Astro + Starlight - #22

Merged
jbouder merged 2 commits into
mainfrom
docs/astro-starlight-scaffold
Aug 20, 2026
Merged

[Docs] Replace the Docusaurus site with Astro + Starlight#22
jbouder merged 2 commits into
mainfrom
docs/astro-starlight-scaffold

Conversation

@jbouder

@jbouder jbouder commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Reference Issues or PRs

Closes #11. Replaces #12 — same goal, rebased on current main and aligned with the docs setup the other packs have since converged on (nebi-pack, apps-pack, nebari-chat-pack).

What does this implement/fix?

  • Documentation Update

Migrates the docs site off Docusaurus 3 + yarn + GitHub Pages. Scope is scaffolding only — the existing Introduction page carries over as-is; real content lands separately.

  • Astro + Starlight static site in docs/, npm for dependency management (Node >= 22)
  • @nebari/starlight shared theme plugin supplies the Nebari identity — brand colors, fonts, logo, favicon, footer, GitHub link — built on the nebari design system. This replaces docs/src/css/custom.css, a hand-copied snapshot of the design tokens that had to be re-synced by hand.
  • remark-base-links plugin so root-absolute markdown links survive the production subpath base, with vitest coverage (10 tests)
  • scripts/check-links.sh verifies every internal link in dist/ resolves
  • Docs workflow: unit tests → build → internal link check → deploy to Cloudflare Pages, replacing deploy-docs.yml (GitHub Pages). main builds at BASE=/superset-pack/ and publishes to packs.nebari.dev/superset-pack/; PRs build at BASE=/ and get a preview URL posted as a comment. A Docs preview cleanup workflow deletes the preview when the PR closes.
  • docs/README.md and a README section on running and updating the docs; .gitignore entries swapped from the Docusaurus artifacts to the Astro ones

The only Makefile in this repo is dev/Makefile, which drives the kind dev cluster — docs targets would be out of place there, so the docs commands are documented as plain npm invocations (same as longhorn-backup-pack and mlflow-pack). Happy to add a root Makefile instead if that's preferred.

Testing

Locally, from a clean checkout:

npm ci        # 513 packages
npm test      # 10 passed
npm run build # 2 pages built
SKIP_BUILD=1 bash scripts/check-links.sh                                     # LINKS_OK
BASE=/superset-pack/ npm run build && SKIP_BUILD=1 BASE=/superset-pack/ ...  # LINKS_OK

Both the root base (PR previews) and the production subpath base build and link-check clean.

Before merging

The Cloudflare Pages project superset-pack and the CLOUDFLARE_API_TOKEN / CLOUDFLARE_ACCOUNT_ID repo secrets need to exist, otherwise the deploy step fails (test, build, and link check still gate the PR). The old GitHub Pages site can be retired once this lands.

🤖 Generated with Claude Code

Migrates the docs site to the framework the other Nebari packs use
(nebi-pack, apps-pack, chat-pack), and moves deployment off GitHub Pages:

- Astro + Starlight site in docs/, npm (was Docusaurus 3 + yarn)
- @nebari/starlight shared theme plugin for the Nebari identity (brand colors,
  fonts, logo, favicon, footer, GitHub link) built on the nebari design system,
  replacing the hand-maintained custom.css token copy
- remark-base-links plugin so root-absolute links survive the production
  subpath base, with vitest coverage
- scripts/check-links.sh to verify every internal link resolves in dist/
- Docs workflow: test, build, internal link check, deploy to Cloudflare Pages
  on main with per-PR preview deployments and a preview-cleanup workflow,
  replacing deploy-docs.yml (GitHub Pages)
- docs/README.md and root README instructions for updating the docs
- .gitignore entries updated for the Astro build artifacts

Scope is the scaffolding only - the existing Introduction page carries over
as-is; content lands separately.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The dashboard's route generator only adds packs.nebari.dev/superset-pack/ ->
https://superset-pack.pages.dev when the pack declares docs_site: true, so the site this
branch adds would not be reachable through the portal without it. The Pages
project name has to match the repo name for that route to resolve, which is
what the docs workflow deploys to.

- docs_site: true
- links.docs repointed from a stale GitHub blob URL to the published site
- site and landing-page descriptions now match the GitHub repo description,
  which is what the dashboard's Description column reads, so the two cannot
  drift apart

Validated against schema/pack-metadata.schema.json from software-pack-dashboard.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jbouder
jbouder force-pushed the docs/astro-starlight-scaffold branch from c9bd0c1 to e4b5997 Compare August 20, 2026 15:25
@jbouder

jbouder commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Added a second commit registering the docs site in pack-metadata.yaml.

This turned out to be load-bearing, not cosmetic. software-pack-dashboard/generate_routes.py builds the portal route table by reading each tracked pack's pack-metadata.yaml and emitting <slug> -> https://<slug>.pages.dev only for packs with docs_site: true, where slug is repo.split("/")[-1]. Without it, packs.nebari.dev/superset-pack/ keeps falling through to the dashboard even after the Pages project exists and the site deploys. That same code path is why the Cloudflare Pages project has to be named superset-pack exactly.

  • docs_site: true
  • links.docs: https://packs.nebari.dev/superset-pack/
  • The Starlight site description and landing-page frontmatter now match this repo's GitHub description, which is what the dashboard's Description column actually reads — so the two can't drift. No description: field was added to the metadata, since the template notes the dashboard doesn't source it from there.

Validated against schema/pack-metadata.schema.json; npm test, the production-base build, and the link check all still pass.

@github-actions

Copy link
Copy Markdown

📄 Docs preview for docs/astro-starlight-scaffold:
https://docs-astro-starlight-scaffol.superset-pack.pages.dev

@jbouder
jbouder merged commit 15b905e into main Aug 20, 2026
1 check passed
@jbouder
jbouder deleted the docs/astro-starlight-scaffold branch August 20, 2026 15:32
dcmcand pushed a commit that referenced this pull request Aug 20, 2026
Fills the docs scaffold from #22 with real content: getting started, deploying on Nebari, standalone, local development, Keycloak OAuth, secret key, database and Redis, and a configuration reference.

Two silent failures get dedicated pages: an unset `nebariapp.routing` (no HTTPRoute and no certificate, while the NebariApp still reports Ready) and Argo CD rotating `SUPERSET_SECRET_KEY` on every sync because `helm template` cannot evaluate `lookup`.

Includes a round of review corrections verified against the rendered chart, upstream superset 0.17.2, the nebari-operator source, and the Kubernetes API and kubelet sources.

Follow-ups filed: #24 #25 #26 #27 #28 #29 #30
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.

[DOC] - Update docs to use typescript/npm/astro

1 participant