Skip to content

[Docs] Scaffold the Astro + Starlight docs site - #6

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

[Docs] Scaffold the Astro + Starlight docs site#6
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 #2. Replaces #3 — 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

This repo had no docs site — just two loose markdown files under docs/. Scope is scaffolding only — no new content is written.

  • 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, so there is no hand-maintained CSS token copy to drift
  • 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. main builds at BASE=/langfuse-pack/ and publishes to packs.nebari.dev/langfuse-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 for the Astro build artifacts

Content carried over

docs/configuration.md and docs/release-readiness.md move into docs/src/content/docs/ so they become pages on the site. Their bodies are unchanged apart from added title/description frontmatter and dropping the duplicate leading # H1, since Starlight renders the frontmatter title as the page heading. README references to the old paths now point at the published pages.

This repo has no Makefile, so the docs commands are documented as plain npm invocations (same as longhorn-backup-pack and mlflow-pack). Happy to add one if that's preferred.

Testing

Locally, from a clean checkout:

npm ci        # 513 packages
npm test      # 10 passed
npm run build # 4 pages built
SKIP_BUILD=1 bash scripts/check-links.sh                                     # LINKS_OK
BASE=/langfuse-pack/ npm run build && SKIP_BUILD=1 BASE=/langfuse-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 langfuse-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).

🤖 Generated with Claude Code

Adds the base documentation framework for the pack, matching the layout the
other Nebari packs use (nebi-pack, apps-pack, chat-pack). The repo previously
had no docs site - just two loose markdown files under docs/.

- Astro + Starlight site in docs/, npm for dependency management
- @nebari/starlight shared theme plugin for the Nebari identity (brand colors,
  fonts, logo, favicon, footer, GitHub link) built on the nebari design system
- 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
- docs/README.md and root README instructions for updating the docs
- .gitignore entries for the Astro build artifacts

configuration.md and release-readiness.md move into src/content/docs/ so they
become pages on the site; their content is unchanged apart from frontmatter
(title/description) and dropping the duplicate H1 that Starlight now renders
from the title. README references to the old paths point at the published
pages.

Scope is the scaffolding only - no new content.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jbouder
jbouder requested a review from dcmcand as a code owner August 20, 2026 14:50
@jbouder jbouder mentioned this pull request Aug 20, 2026
18 tasks
The dashboard's route generator only adds packs.nebari.dev/langfuse-pack/ ->
https://langfuse-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 added, pointing at 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 796f1c2 to fe61eac 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/langfuse-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 langfuse-pack exactly.

  • docs_site: true
  • links.docs: https://packs.nebari.dev/langfuse-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.langfuse-pack.pages.dev

@jbouder
jbouder merged commit 9adbfb0 into main Aug 20, 2026
5 of 6 checks passed
@jbouder
jbouder deleted the docs/astro-starlight-scaffold branch August 20, 2026 15:36
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] - Conform docs to other packs

1 participant