Astro-powered documentation site for data-science-pack, built on Starlight
with the shared @nebari/starlight theme. Mirrors the pattern used by
nebari-dev/provenance-collector-pack, nebari-dev/llm-serving-pack, and
nebari-dev/nebari-frames: build on Astro, deploy to Cloudflare Pages, and
route through the packs.nebari.dev portal.
Deployed at https://packs.nebari.dev/data-science-pack/ (the portal
Worker proxies that path to the data-science-pack Cloudflare Pages
project). Pull requests get an ephemeral preview at
https://<branch>.data-science-pack.pages.dev.
cd docs
npm install
npm run dev # http://localhost:4321Then edit files under src/content/docs/. Astro reloads on save.
Relative to this directory:
astro.config.mjs- Starlight +@nebari/starlight(also renders mermaid fences) +remark-base-linkspackage.json,tsconfig.json,.gitignoresrc/content.config.ts- Starlight docs collectionsrc/content/docs/*.md- actual pages (frontmatter required:title,description)src/plugins/remark-base-links.ts- rewrites root-absolute links when deployed under a subpathtests/remark-base-links.test.ts- vitest for the plugin
Related, at the repo root:
.github/workflows/docs.yml- build, link-check, deploy to Cloudflare Pages.github/workflows/docs-preview-cleanup.yml- delete a PR's previews when it closesscripts/check-links.sh- internal-link validator againstdocs/dist/
docs.yml runs on push-to-main and on PRs touching docs/**,
scripts/check-links.sh, or the workflow itself.
- Node 22,
npm ciindocs/. - Runs
vitest(theremark-base-linksplugin test). - Computes
SITE/BASEper event: onmain,BASE=/data-science-pack/(served under the portal subpath); on a PR,BASE=/(the preview lives at its own*.pages.devsubdomain). - Builds, then runs
scripts/check-links.shagainstdocs/dist/- every internalhref/srcmust resolve to a file. - Deploys
docs/dist/to thedata-science-packCloudflare Pages project withwrangler pages deploy. Main deploys to production; PRs deploy a preview and get the URL posted as a sticky comment.
The deploy needs two secrets, available to the workflow as
CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID (org-level secrets shared
across the pack repos, or repo-level). The Cloudflare Pages project is
self-provisioning - the deploy step runs wrangler pages project create if
it does not exist, so there is no manual dashboard step.
Portal routing at packs.nebari.dev/data-science-pack/ is driven by
docs_site: true in the repo-root pack-metadata.yaml: the
nebari-dev/software-pack-dashboard route generator picks it up and maps the
slug to https://data-science-pack.pages.dev.
If the secrets are not yet visible to this repo, PR builds still run and gate (deploy skips); the first push-to-main deploy fails loudly until they resolve.
Wired into the sidebar:
index.md- landing page for the docs site.- Guides:
quick-start.md,architecture.md,shared-storage.md. - Reference:
configuration.md,nebariapp-integration.md.
- Custom favicon / brand asset overrides beyond what
@nebari/starlightprovides.