Skip to content

feat(docs): Starlight docs at /docs, built from uptide-dev/uptide's docs/ - #3

Merged
lucasbraum merged 1 commit into
mainfrom
claude/exciting-cerf-g01c4c
Oct 9, 2026
Merged

lucasbraum merged 1 commit into
mainfrom
claude/exciting-cerf-g01c4c

Conversation

@lucasbraum

Copy link
Copy Markdown
Contributor

Adds a docs site at /docs, built with Astro Starlight. The landing page at / is unchanged apart from a Docs link in its top bar and footer. The footer link is there because the top-bar nav is hidden on mobile.

Content

  • Every build clones uptide-dev/uptide@main over anonymous HTTPS and uses its docs/ folder as the content collection (docs-site/scripts/fetch-docs.mjs). The checkout and the generated pages are gitignored; a test asserts no docs are committed here.
  • Titles and descriptions: each page's front matter title/description is used as is. 23 pages (architecture, packs, the decision records, …) have no front matter, so they fall back to their first # heading and first paragraph. A leading Status: accepted (…) line is skipped. The first # is dropped because Starlight renders the title as the h1.
  • Sidebar: built from the docs/README.md tables, "Using Uptide" first, then "Contributing and internals", in README order. decisions/ becomes a collapsed group, and CONTRIBUTING.md and SECURITY.md link to GitHub. A README without those two sections fails the build.
  • Links: a link to another page under docs/ stays on the site (../concepts.md#exit-codes → /docs/concepts/#exit-codes). Links to anything else in the repository go to GitHub: ../CONTRIBUTING.md and ../packs/queue.json to blob/…; fixtures/repos/storefront and decisions/ to tree/….
  • Edit links: each page's "Edit page" link opens the source file on GitHub.

Brand

  • Tokens and fonts: the Uptide tokens are mapped onto Starlight's color scale for both themes (docs-site/src/styles/uptide.css). Space Grotesk, Instrument Sans and IBM Plex Mono load from the existing site/fonts files.
  • Shape: square corners, 1px rules, no shadows.
  • Code blocks: Expressive Code with a single dark theme on #131210 in both themes.
  • Header: the two-blue mark and lowercase uptide wordmark link to /, with GitHub and npm icon links. Search is Starlight's built-in Pagefind.
  • One deviation: light-mode dim text is #6A675F instead of the landing page's #76736B, which is just under 4.5:1 for small text on #F4F2EC.
  • Meta tags: canonical URLs and og:image (the existing og.png) come from the same SITE_URL as the landing page.

Deploy

  • Pages: pages.yml builds the docs, assembles site/ at the root and the docs under /docs into _site/, writes SITE_URL, checks links, and deploys. It triggers on every push to main, daily at 05:23 UTC (to pick up docs changes in uptide-dev/uptide), and on workflow_dispatch. It no longer filters on site/**, since the docs come from another repository.
  • CI: a new site job in ci.yml runs the same build and link check on PRs.
  • Versions: astro@7.3.8, @astrojs/starlight@0.42.6 and @astrojs/markdown-remark@7.3.2 are pinned exactly (save-exact). The lockfile is committed and Node 22.22.0 is pinned in docs-site/.node-version. Astro 7 no longer bundles the remark pipeline, which is why @astrojs/markdown-remark is a direct dependency.

Checks run locally

  • Build: npm run build with the real anonymous clone gives 41 docs pages and the Pagefind index.
  • Links: scripts/check-links.mjs checks 2,660 internal links and anchors across landing + docs; none are broken. I confirmed it fails when given a missing page or a missing #anchor.
  • Lighthouse accessibility (13.5.0): 100 on /docs/ and /docs/commands/fix/, light and dark, with both the mobile and desktop presets. Dark runs used --force-dark-mode; Lighthouse's own screenshots show the dark background, so the dark theme really rendered.
  • Tests: node --test 'test/*.test.mjs' passes 11 tests. New ones cover exact versions, nothing committed, title/description fallbacks, the sidebar, and link rewriting. The workflow tests were updated for the new triggers and _site artifact.

Screenshots

Light Dark
/docs/ docs light docs dark
/docs/commands/check/ command light command dark
Search: "telemetry" search light search dark

The landing captures in docs/screenshots/site-landing/ are refreshed because the nav gained the Docs link.

Notes

  • npm audit reports 10 moderate advisories, all through postcss-selector-parser <7.1.6. It is a build-time transitive dependency of Astro, and nothing from it ships to the browser. The only fix offered is npm audit fix --force with breaking changes, so I left it for an Astro update.
  • There is no custom 404. GitHub Pages serves only a root 404.html, which the landing page doesn't have today.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VcwhsQvN6vtpRCe4uwfe8z


Generated by Claude Code

…ocs/

A docs site next to the landing page, which stays as it is apart from a
Docs link in its top bar and footer.

- docs-site/: Astro 7.3.8 and Starlight 0.42.6, every version exact,
  with the lockfile and a pinned Node.
- Content: each build clones uptide-dev/uptide@main (anonymous HTTPS)
  and generates the collection from docs/; nothing is committed here.
  Front matter title and description are kept, with the first heading
  and paragraph as fallback; relative links to repository files outside
  the docs go to GitHub; the sidebar follows docs/README.md.
- Brand: the landing page's tokens, fonts from site/fonts, square
  corners, 1px rules, no shadows, dark code blocks in both themes, and
  the mark and wordmark linking to /. Search is Starlight's Pagefind.
- Canonical URLs and og:image (the existing og.png) from SITE_URL.
- Pages builds landing and docs together on push to main, daily and by
  hand; CI runs the same build. scripts/check-links.mjs fails on any
  broken internal link or anchor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VcwhsQvN6vtpRCe4uwfe8z
Signed-off-by: Claude <noreply@anthropic.com>
@lucasbraum
lucasbraum marked this pull request as ready for review October 9, 2026 18:25
@lucasbraum
lucasbraum merged commit 5016927 into main Oct 9, 2026
3 checks passed
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