Convert the documentation site from Docusaurus to Starlight - #30
Draft
marten wants to merge 3 commits into
Draft
Conversation
Adds a feature page covering "eigen initiatief" end to end: how it is enabled per measurement, what staff see when granting the right, what the respondent gets, and how the resulting responses show up in the data. Points at the parts that still need verifying rather than guessing at them. Reframes the manual index and the feature overview around browsing by feature instead of by module, and moves the feature section directly below the index in the sidebar to match. Cross-references from the EPD overview and measurement pages link into the new page. Uses Starlight's `note` aside for those cross-references: `info` is a Docusaurus variant that Starlight renders as an unstyled div, dropping the callout framing and any custom title without emitting a build warning. Claude-Session: https://claude.ai/code/session_018s8Dyz49WwNfkVF5zpT6ko
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The Vercel project's Output Directory is set to `build` in its dashboard, which was Docusaurus's output. Astro writes to `dist`, so preview deployments failed with "No Output Directory named build found" even though the build itself succeeded. Setting it in vercel.json overrides the dashboard value, so the fix is versioned with the code rather than depending on project settings. Also pins the framework preset, which the dashboard still had as Docusaurus, and canonicalises trailing slashes. Starlight emits internal links with a trailing slash and Astro builds directory indexes, so matching that avoids a redirect hop and keeps relative links resolving the same way they do on the self-hosted master deploy. Claude-Session: https://claude.ai/code/session_018s8Dyz49WwNfkVF5zpT6ko
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces Docusaurus 3.9 with Astro 7 + Starlight 0.41. No third-party Starlight plugins.
Builds 157 pages,
npm run typecheck(astro check) reports 0 errors.URL parity
I captured every URL the Docusaurus build produced before starting and diffed the Starlight output against it. The only differences are intentional:
/docs/index/→/docs/01-index.mdnumeric prefix. It was the navbar's "User Manual" target, so a redirect keeps it working./markdown-page/removed/changelog/**removedchangelog/, so the CI that pushes release notes there keeps working./blog/**removedEverything else — all of
/docs/**,/technical/**,/status/, and the/en/**mirror — resolves at exactly the same URL as before.How the content moved
docs/,technical/andi18n/en/collapse into one content collection undersrc/content/docs/, tracked as renames so history follows. Mechanical conversions:# Headinghoisted intotitle:frontmatter, which Starlight renders as the H1. Where a file had both, the old frontmatter title becamesidebar.label.:::info→:::note. Starlight has noinfovariant and renders unknown ones as an unstyled div, with no build warning.{/* */}. Docusaurus stripped them before MDX parsing; Astro does not.require()snapshot fixtures → ESM imports, now insrc/data/snapshots/.Every page is
.mdx, because Docusaurus already parsed all.mdas MDX. Plain.mdwould silently change how the JSX and{…}in these files parse.Sidebar
Labels and ordering match the old site exactly. Ordering is encoded in
sidebar.order: Starlight gives a directory the lowest order of its children, so the oldNN-prefixes translate faithfully. Group labels come from each directory's index-page title viasrc/starlightRouteData.ts, which keeps Docusaurus's behaviour — a new subdirectory only needs an index page to get a readable label, no config edit.Components
Icon,Screenshot,ScreenshotRowandSnapshotare now Astro components. The hand-rolled tab widget is gone in favour of Starlight's<Tabs>, which is keyboard-accessible and syncs, so choosing cURL once applies to every request on the page.There is no global component scope in MDX, so pages import what they use. This is documented in the README.
Gained
Pagefind search (the old site had none), a sitemap, and image optimisation.
Deployment
masteris self-hosted: the GitHub Actions workflow now uploads and rsyncsdist/instead ofbuild/.Preview branches build on Vercel, whose project settings still had Docusaurus's
buildas the Output Directory, so previews failed even though the build succeeded.vercel.jsonnow setsoutputDirectorytodistand the framework preset toastro, overriding the dashboard so the setting is versioned with the code. It also setstrailingSlash: trueto match Astro's directory output and the internal links Starlight generates.Known gaps
/blog/rss.xmland changelog feeds; nothing regenerates them. Roughly 15 lines with@astrojs/rssif anyone subscribed.en/docs/index.mdx,en/docs/features/index.mdx,en/docs/epd/overview/index.mdxanden/docs/epd/measure/measurements/index.mdxstill hold the pre-edit text. They have translations, so they do not fall back.#show,#index) became autogenerated slugs;{#id}is not valid MDX.Not done, worth deciding
starlight-sidebar-topicswould restore the separate per-section sidebars — the manual and the technical docs are currently two groups in one sidebar rather than independent ones.https://claude.ai/code/session_018s8Dyz49WwNfkVF5zpT6ko