2.2 KiB
2.2 KiB
Why
Step 001 established brand tokens and fonts — we now have a working Astro project but every page must manually construct its own <html> document with head meta tags. Step 002 creates the shared BaseLayout.astro shell so all subsequent pages start from a consistent, SEO-complete foundation without repetition.
What Changes
- New:
src/layouts/BaseLayout.astro— HTML document shell accepting props for title, description, locale, canonical URL, alternate URL, OG image, and JSON-LD structured data - New:
src/components/Nav.astro— empty stub (filled in step 003) - New:
src/components/Footer.astro— empty stub (filled in a later step) - New:
src/content/en.json— initial structure with global meta fields (site name, default title, default description, default OG image path) - New:
src/content/nl.json— Dutch translations of the same global meta fields - New:
src/content/i18n.ts— helper that loads and returns the correct JSON content object based on locale string - Update:
src/pages/index.astro— replace manual<html>shell with<BaseLayout>, passing appropriate props
Capabilities
New Capabilities
base-layout: HTML document shell providing consistent<head>(charset, viewport, favicon, Archia font preloads, canonical link, hreflang alternates, OG tags, Twitter card tags) and<body>defaults (Midnight background, Snow text, Archia font), with stub nav/footer and content/JSON-LD slotscontent-i18n: File-based content loading system — JSON files per locale (en.json,nl.json) plus ani18n.tshelper function that returns the correct content object given a locale string
Modified Capabilities
brand-tokens: No requirement changes — the existing spec covers colors, fonts, and gradient; BaseLayout consumes these tokens but does not change them
Impact
- All future pages (
/,/about,/ai-launchpad,/contact,/privacy, plus/nl/*variants) will import and useBaseLayout - SEO: adds canonical URL, hreflang (
en↔nl), OG tags, and Twitter card tags to every page - Affects
en.json/nl.jsoncontent structure (introduces themetakey) - No new npm dependencies — uses only Astro built-ins and TypeScript