From 1d65bb7aa8c6fe9a788b23134506547a6bdbfe4a Mon Sep 17 00:00:00 2001 From: Anthony GAEREMYNCK <1@anthony.sh> Date: Sun, 2 Aug 2026 15:54:42 +0200 Subject: [PATCH] feat: add BaseLayout with SEO head tags and theme init script Canonical/hreflang/OG tags derived from the locale dictionary, plus a pre-paint script applying data-theme from localStorage or system preference. --- .../plans/2026-08-02-ombrora-hub-landing.md | 8 +- src/layouts/BaseLayout.astro | 46 ++++++ src/pages/en/index.astro | 14 +- src/pages/fr/index.astro | 14 +- src/styles/global.css | 137 ++++++++++++++++++ tests/seo-theme.test.ts | 40 +++++ 6 files changed, 238 insertions(+), 21 deletions(-) create mode 100644 src/layouts/BaseLayout.astro create mode 100644 src/styles/global.css create mode 100644 tests/seo-theme.test.ts diff --git a/docs/superpowers/plans/2026-08-02-ombrora-hub-landing.md b/docs/superpowers/plans/2026-08-02-ombrora-hub-landing.md index 617cf66..68f95fc 100644 --- a/docs/superpowers/plans/2026-08-02-ombrora-hub-landing.md +++ b/docs/superpowers/plans/2026-08-02-ombrora-hub-landing.md @@ -457,14 +457,16 @@ describe('BaseLayout SEO tags and theming', () => { expect(en).toContain('prefers-color-scheme: light'); }); - it('links the global stylesheet', () => { + it('applies the global stylesheet (inlined or linked)', () => { const en = readFileSync('dist/en/index.html', 'utf-8'); - expect(en).toMatch(/]*href="[^"]+\.css"/); + const hasInlineStyle = /