feat(astro): full page routes + site shell + data bridge + lineage renderer#101
Merged
Conversation
… 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)
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.
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 foundSite shell
SiteHeader.astro— logo, search icon, dark mode toggle (inline JS)SiteSidebar.astro— navigation tree with dataset/group links (SSG)SiteFooter.astro— links + powered byDefault.astro— layout shell with no-flash dark mode scriptData bridge (
scripts/bridge-to-astro.mjs)Converts existing
public/data/*.jsonto 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
prefers-color-schemefallbackVerified
npx astro build— 13 pages + sitemap generatedgetStaticPathsresolve correctlynpm run build(existing Vue SPA) — unaffectedRemaining (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.