Documentation portal built with Blume.
pnpm install --frozen-lockfile
pnpm devOpen the server's root URL (normally http://localhost:4321/) for the entry page.
The language-prefixed URL /en redirects to /; the documentation currently
uses URLs without a language prefix.
Check the documentation and build the static site:
pnpm run doctor
pnpm test
pnpm buildThe generated site is written to dist/. Serve this directory as the site root,
including its index.html.
| Source | Route | Purpose |
|---|---|---|
docs/index.mdx |
/ |
Entry page linking to the available documentation |
docs/openapi/openapi.yaml |
/api-reference |
Uranus API reference generated by Blume |
docs/reference/index.mdx |
/reference |
Entry page for live reference data |
docs/reference/event-types-and-genres.mdx |
/reference/event-types-and-genres |
Event types and genres fetched in the browser |
docs/reference/license-types.mdx |
/reference/license-types |
Selectable license types fetched in the browser |
blume.config.ts defines the content root, OpenAPI sources and navigation tabs.
Each tab's path identifies its section and links to that section's entry page.
The Uranus API tab uses /api-reference. The site title, Uranus Docs, links
back to / from every section, so the entry page does not need its own tab.
islands/EventTypeGenreLookup.tsx loads the current lookup from
https://api.kulturbytes.de/api/event/type-genre-lookup on page load, language
changes and Reload data. The page supports English, German and Danish names,
search by name or original ID, summary counts, and types without genres. It
shows loading, empty and error states, with a retry button and a 30-second timeout.
Superseded requests are cancelled so a slow response cannot replace the newly
selected language. API values render as text through React.
islands/LicenseTypeLookup.tsx loads the current license types from
https://api.kulturbytes.de/api/choosable-license-types?lang=en, with the same
language selection, reload and request handling. It displays the original API
keys and localized names, plus descriptions when available. Search matches keys,
names and descriptions. src/lib/license-types.ts validates the response before
displaying it; src/lib/languages.ts defines the languages shared by both pages.
Blume discovers the island automatically. Its client = "load" export enables
hydration on page load. The API is never fetched during the build; the site can
still be deployed as static files. Python and ReportLab are not needed for these
pages. Visitors need JavaScript and access to the API. A direct JSON link is
available when JavaScript is disabled or the API request fails.
The public API must allow the site's origin through CORS. It currently returns
Access-Control-Allow-Origin: *; requests omit credentials. A deployment with a
Content Security Policy must also allow https://api.kulturbytes.de in
connect-src. The live values are not part of Blume's build-time search index
or Markdown exports; the page's own search filters the fetched data.
To add another live reference page:
- Add its MDX page under
docs/reference/and link it from the reference index. - Add a React component under
islands/, named in PascalCase, and use it in MDX as<YourComponent />. Exportconst client = "load"from the component. - Reuse
src/hooks/useApiData.tsfor loading, retry, timeout and cancellation. Pass the endpoint URL and a stable parser (a module-level function, or one created withuseCallbackwhen parsing depends on component state).src/lib/api.tsprovides the common JSON transport and reader-facingApiError; keep endpoint-specific validation in a separate module, as insrc/lib/event-type-genre.ts. - Extend
tests/reference-data.test.mjswith parser/transport tests and run the checks above.
For a future Pluto image database section:
- Create
docs/pluto/index.mdxas its entry page and add further pages underdocs/pluto/. Blume maps these files to/plutoand/pluto/.... - Add
{ label: "Pluto", path: "/pluto" }tonavigation.tabsinblume.config.ts. Blume scopes the sidebar to that section. - Add a card linking to
/plutoindocs/index.mdxonce its documentation is available. AdjustCardGroup'scolsif multiple cards should appear side by side.
Additional OpenAPI specifications can be registered in openapi.sources, each
with its own label and route, and linked from a matching navigation tab and
the entry page.