From f36fa18aea3b1f41ae40387681f6a64b1eb73450 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Tue, 19 May 2026 15:32:58 -0300 Subject: [PATCH] feat(web): port homepage to Astro static page Moves apps/web/public/index.html into apps/web/src/pages/index.astro so the homepage now participates in the Astro build pipeline (same as the 4 content pages and the type/topic dynamic routes). The change is minimal by intent: - Frontmatter comment explaining the file's relationship to Layout.astro (it intentionally doesn't use Layout because the homepage has its own brand chrome and a richer Dataset JSON-LD structure than the shared one) - The inline gtag config script gets 'is:inline' so Astro doesn't try to bundle/transpile it - The inline CSS block gets 'is:global is:inline' to preserve the unscoped legacy stylesheet verbatim - The body explorer JS gets 'is:inline' for the same reason Everything else is untouched: explorer JS, SEO meta, OG/Twitter brand tagline, Dataset JSON-LD with variableMeasured/inLanguage/measurementTechnique, favicon paths, About section static links, footer. Verified locally: - bun run --cwd apps/web build -> 26 pages built in 18s (was 25, +index.html) - bun run --cwd apps/web typecheck -> 0 errors - dist/index.html has the SEO title, brand-tagline og:title, full JSON-LD, 19 unique /types/*+/topics/* static links, all explorer JS globals (renderTypesGrid, fetchDocuments, manifest-btn) - dist/index.html: 43.7 KB (legacy was ~45 KB; Astro minified the markup) --- .../index.html => src/pages/index.astro} | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) rename apps/web/{public/index.html => src/pages/index.astro} (98%) diff --git a/apps/web/public/index.html b/apps/web/src/pages/index.astro similarity index 98% rename from apps/web/public/index.html rename to apps/web/src/pages/index.astro index 6fde6ac..c5e9a81 100644 --- a/apps/web/public/index.html +++ b/apps/web/src/pages/index.astro @@ -1,10 +1,24 @@ +--- +// Homepage. Ported from the legacy static apps/web/public/index.html so it +// participates in the Astro build pipeline. Inline CSS and JS are preserved +// verbatim under `is:global is:inline` and `is:inline` respectively; the +// explorer JS still fetches live data from api.docxcorp.us at runtime, same +// as before. +// +// This page intentionally doesn't use the shared Layout.astro because its +// header/footer chrome and SEO metadata (custom og:title brand tagline, +// twitter:description with "The missing dataset" copy, full Dataset JSON-LD +// with variableMeasured/inLanguage/measurementTechnique) differ from the +// shared one. The other Astro pages still go through Layout. +--- + -