Skip to content

docs: migrate to shared @fhir-toolkit/docs-theme#3

Merged
dnlbox merged 13 commits into
mainfrom
docs/astro-starlight-fresh
May 24, 2026
Merged

docs: migrate to shared @fhir-toolkit/docs-theme#3
dnlbox merged 13 commits into
mainfrom
docs/astro-starlight-fresh

Conversation

@dnlbox
Copy link
Copy Markdown
Owner

@dnlbox dnlbox commented May 20, 2026

Summary

Migrates the documentation site to consume the new shared @fhir-toolkit/docs-theme package via the Option B source-directory sync strategy (no npm dependency — theme files are vendored into src/theme/ by running node packages/docs-theme/scripts/sync.js at the workspace root).

Changes

  • docs/site/astro.config.mjscustomCss now loads theme-amber.css + base.css from src/theme/ before the local custom.css
  • docs/site/src/theme/ — synced shared theme: tokens, Starlight overrides, CommandOutput.astro
  • docs/site/src/components/CommandOutput.astro — deleted (replaced by theme copy); .mdx imports updated
  • docs/site/src/styles/custom.css — cleared to a placeholder comment (all styles now in shared theme)
  • docs/site/src/pages/index.astro — custom landing page matching toolkit design system

How to update the theme going forward

node packages/docs-theme/scripts/sync.js   # from fhir-toolkit/ workspace root

Verification

pnpm build passes all 18 pages with 0 errors. All 497 unit tests pass.

dnlbox and others added 11 commits May 20, 2026 15:46
Deleted the existing VitePress site entirely. Scaffolded a fresh Astro 5
+ Starlight 0.34 docs site at docs/site/ for comparison against the
fhir-resource-diff site.

- astro.config.mjs: base /fhir-test-data, legacy content collections,
  autogenerate sidebar (avoids SSG timing bugs in 0.34), Pagefind search,
  GitHub social link, edit-page links
- Design system: Plus Jakarta Sans Variable (display), IBM Plex Mono,
  warm amber-terracotta accent (#c2733a light / #e8944a dark), off-white
  warm backgrounds, geometric SVG grid watermark on splash
- CommandOutput.astro: prompt-bar + scrollable output pane component
- Logo SVGs: 3x3 dot-grid design, no external assets
- docs.yml workflow: updated output path from .vitepress/dist to dist/
- root package.json: docs: scripts updated to pnpm --dir, vitepress removed
- DESIGN.md: design rationale (gitignored per workspace posture)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Splash page with CardGrid (6 cards): locales, check-digit algorithms,
resource types, deterministic generation, FHIR version support,
browser-safe core. All claims verified against src/core/types.ts and
the package exports.

Getting-started: installation (with npm/pnpm/yarn tabs and package
exports table), quick-start (actual UK patient output from
--locale uk --seed 42, bundle example, count and output examples).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Four pages: overview (top-level help verbatim), generate (all flags with
actual --help output + worked examples including fault injection output),
locales (description + truncated output), describe (synopsis + options).

CLI help text sourced from running node dist/cli/index.js --help on the
built package. No invented flag descriptions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Overview page with full 14-locale table, check-digit algorithm table.
Individual pages for US, UK, AU with identifier format details, FHIR
system URIs, and authoritative source citations.
Single consolidated page for remaining 11 locales.

All identifier names, system URIs, and algorithms traced directly to
src/core/generators/identifiers.ts and src/locales/*/index.ts.
External standard citations: NHS Modulus 11, CMS NPI Luhn, Services
Australia IHI, UIDAI Aadhaar Verhoeff, RSA ID Luhn.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
API section: builders (fluent chain interface, all 11 factory functions,
method descriptions, PractitionerRole extras), types (all exported
TypeScript types with inline code).

Guides: fault injection (all 11 concrete fault types from faults/types.ts,
CLI and library usage, fhir-resource-diff integration), generate-validate
pipeline (NDJSON, annotated, regression fixtures, CI workflow),
overrides (CLI inline JSON, stdin, library method, merge semantics).

All fault types verified against src/core/faults/types.ts.
All builder method signatures verified against src/core/builders/*.ts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The encounter and diagnostic-report generators were added in 0.1.3 but
were never wired into the describe command's DescribableResourceType
union or RESOURCE_DESCRIPTIONS map, so `describe encounter` and
`describe diagnostic-report` errored with "unknown resource type".

Add both entries following the Observation/Condition pattern, including
the R4/R4B Coding vs R5 CodeableConcept-array distinction for Encounter
class.
These resource types are now covered by the describe command
(fixed in main). Drop the "not yet covered" caveat and add both
to the listed resource types.
Starlight's autogenerate sidebar prepends the configured base path
automatically; hero.actions[].link frontmatter values are passed through
as-is and do not receive the same treatment. The two CTA links on the
splash page were missing the /fhir-test-data prefix, causing 404s on
the deployed GitHub Pages site where every route lives under that base.

Added /fhir-test-data prefix to both links and documented the behaviour
in astro.config.mjs so the fhir-capability-analyzer site avoids the
same mistake.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add shared theme files under docs/site/src/theme/ (tokens, styles, components)
  synced from packages/docs-theme via scripts/sync.js
- Wire theme-amber.css + base.css into astro.config.mjs customCss
- Remove local CommandOutput.astro duplicate; update mdx imports to theme copy
- Clear custom.css to a placeholder comment (all styles now in shared theme)
- Add custom landing page (src/pages/index.astro) matching toolkit design
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dnlbox dnlbox changed the title docs: migrate to shared @fhir-toolkit/docs-theme (Option B sync) docs: migrate to shared @fhir-toolkit/docs-theme May 20, 2026
@dnlbox dnlbox self-assigned this May 20, 2026
dnlbox and others added 2 commits May 20, 2026 18:28
…tion

tsup 8.x injects baseUrl when paths is configured for DTS generation.
TypeScript 6.0 treats this as a deprecation error without ignoreDeprecations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… deps in CI

pnpm-workspace.yaml at the repo root makes pnpm treat root as the workspace root,
so pnpm install with working-directory: docs/site installs root packages only,
leaving docs/site/node_modules empty (astro: not found in CI).

Changes:
- pnpm-workspace.yaml: add packages: [docs/site]; add sharp to allowBuilds
- docs.yml: remove working-directory from install step (root install now covers
  all workspace members including docs/site)
- docs/site/package.json: downgrade sharp to ^0.33.5 — 0.34.5 fails under pnpm
  virtual store on macOS and would fail cross-platform in CI
- pnpm-lock.yaml: regenerated to include docs/site deps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dnlbox dnlbox merged commit fc673b7 into main May 24, 2026
6 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.

1 participant