From 81e5846a16439e0cc8f5278f3df88b1d111bc5b0 Mon Sep 17 00:00:00 2001 From: Dan Gibbs Date: Mon, 11 May 2026 14:41:02 +0100 Subject: [PATCH 1/2] fix: 404 page is not noindexed --- src/pages/404.md | 1 + tests/pages/base-page.ts | 6 ++++++ tests/spec/404.spec.ts | 12 ++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 tests/spec/404.spec.ts diff --git a/src/pages/404.md b/src/pages/404.md index d1d539b..186435f 100644 --- a/src/pages/404.md +++ b/src/pages/404.md @@ -2,6 +2,7 @@ layout: '@layouts/Base.astro' title: Page not found description: 404 page not found +robots: noindex, nofollow --- # 404 Not Found diff --git a/tests/pages/base-page.ts b/tests/pages/base-page.ts index 37971c1..81a5bb3 100644 --- a/tests/pages/base-page.ts +++ b/tests/pages/base-page.ts @@ -33,6 +33,12 @@ export class BasePage { }; } + async goto(path: string) { + await this.page.goto(path, { + waitUntil: 'domcontentloaded', + }); + } + async getMeta() { return this.meta; } diff --git a/tests/spec/404.spec.ts b/tests/spec/404.spec.ts new file mode 100644 index 0000000..641d2e6 --- /dev/null +++ b/tests/spec/404.spec.ts @@ -0,0 +1,12 @@ +import { test, expect } from '@playwright/test'; +import { BasePage } from '@tests/pages/base-page'; + +test.describe('404 page not found', () => { + test('page is noindexed', async ({ page }) => { + const base = new BasePage(page); + await base.goto('404-not-found'); + + const meta = await base.getMeta(); + expect(await meta.robots.getAttribute('content')).toBe('noindex, nofollow'); + }); +}); From 090847a1d59fb587325ae4e105e9b2e33630c59e Mon Sep 17 00:00:00 2001 From: Dan Gibbs Date: Mon, 11 May 2026 14:43:55 +0100 Subject: [PATCH 2/2] fix: inline hack for alert p margin --- src/components/Block/Alert.astro | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/Block/Alert.astro b/src/components/Block/Alert.astro index 3d8805c..920ac7c 100644 --- a/src/components/Block/Alert.astro +++ b/src/components/Block/Alert.astro @@ -18,7 +18,7 @@ const icon = icons[type]; -