Skip to content

feat(astro): full page routes + site shell + data bridge + lineage renderer#101

Merged
ronaldtse merged 2 commits into
mainfrom
feat/astro-full-migration
Jul 9, 2026
Merged

feat(astro): full page routes + site shell + data bridge + lineage renderer#101
ronaldtse merged 2 commits into
mainfrom
feat/astro-full-migration

Conversation

@ronaldtse

Copy link
Copy Markdown
Member

Summary

Full Astro migration with all 15 page routes, site shell (header/sidebar/footer), data bridge, and lineage group renderer. 13 pages build cleanly via SSG with zero runtime JS for static content.

What's included

All 15 page routes

  • / — home with dataset listing grouped by collection
  • /dataset/[id] — dataset overview with concept list
  • /dataset/[id]/concept/[cid] — concept detail
  • /dataset/[id]/about — dataset about page
  • /dataset/[id]/stats — pre-computed statistics with status distribution bars
  • /group/[id] — group overview with lineage timeline renderer (year badges, current marker, edition cards)
  • /group/[id]/about — group about
  • /search — client-side live search via inline script (zero dependencies)
  • /graph — cross-dataset overview
  • /ontology — ontology class browser
  • /resolve/[...uri] — URI resolver redirect
  • /news — article list
  • /contributors — contributor list from site-config
  • /[slug] — generic markdown pages
  • /404 — not found

Site shell

  • SiteHeader.astro — logo, search icon, dark mode toggle (inline JS)
  • SiteSidebar.astro — navigation tree with dataset/group links (SSG)
  • SiteFooter.astro — links + powered by
  • Default.astro — layout shell with no-flash dark mode script

Data bridge (scripts/bridge-to-astro.mjs)

Converts existing public/data/*.json to Astro content collections at build time. No changes needed to the existing data pipeline — the bridge runs as a pre-build step.

Key features preserved

  • Lineage group renderer: timeline with year badges + current marker
  • Dark mode: cookie-based, no-flash inline script, prefers-color-scheme fallback
  • Search: zero-JS-dep inline script with live fuzzy filter
  • Stats: pre-computed status distribution bar chart
  • i18n: 15 locales configured
  • Sitemap: auto-generated

Verified

  • npx astro build13 pages + sitemap generated
  • All getStaticPaths resolve correctly
  • Content collections validate via Zod schemas
  • Zero runtime JS for static pages
  • npm run build (existing Vue SPA) — unaffected

Remaining (Vue islands — TODO.astro/09-12)

The existing Vue SPA's interactive components (RelationSphere, GraphPanel, full ConceptDetail with tabs, RDF panel) will be ported as client:* islands in a follow-up PR. The SSG foundation is complete.

ronaldtse added 2 commits July 9, 2026 14:22
… build

Full Astro migration: every route from the Vue SPA is now an Astro
page. 13 pages build cleanly with zero JS for static content.

## Pages (all 15 routes)

- / (home — dataset listing with groups)
- /dataset/[id] (dataset overview with concept list)
- /dataset/[id]/concept/[cid] (concept detail)
- /dataset/[id]/about (dataset about page)
- /dataset/[id]/stats (pre-computed statistics)
- /group/[id] (group overview — lineage timeline / card grid)
- /group/[id]/about (group about)
- /search (client-side live search via inline script)
- /graph (cross-dataset overview)
- /ontology (ontology class browser)
- /resolve/[...uri] (URI resolver redirect)
- /news (article list)
- /contributors (contributor list)
- /[slug] (generic markdown pages)
- /404 (not found)

## Site shell

- SiteHeader.astro — logo, search icon, dark mode toggle (inline JS)
- SiteSidebar.astro — navigation tree with dataset/group links (SSG)
- SiteFooter.astro — links + powered by
- Default.astro — layout shell with no-flash dark mode script

## Data bridge (scripts/bridge-to-astro.mjs)

Converts public/data/*.json into Astro content collections:
- datasets.json → src/content/datasets/*.json
- {id}/manifest.json → dataset entries with year, ref, status
- {id}/index.json → src/content/concepts/{id}/*.json
- site-config.json groups → src/content/groups/*.json
- public/pages/*.json → src/content/pages/*.md

## Features

- Lineage group renderer: timeline with year badges + current marker
- Dark mode: cookie-based, no-flash inline script
- Search: zero-JS-dep inline script with fuzzy filter
- Stats: pre-computed status distribution bars
- Sitemap: auto-generated by @astrojs/sitemap
- i18n: 15 locales configured in astro.config.mjs

## Verified

- npx astro build: 13 pages + sitemap generated
- All getStaticPaths resolve correctly
- Content collections validate via Zod schemas
- Zero runtime JS for static pages (home, dataset, group, stats)
@ronaldtse ronaldtse merged commit 7d61e7a into main Jul 9, 2026
4 checks passed
@ronaldtse ronaldtse deleted the feat/astro-full-migration branch July 9, 2026 06:28
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