From 35ade283d46a5c98222398e88ab40e67763fbeb9 Mon Sep 17 00:00:00 2001 From: Charlie Carson Date: Sun, 1 Nov 2026 14:46:04 -0600 Subject: [PATCH 1/2] Give the two lesson tools pages an h1 --- src/app/tools/olf/layout.tsx | 12 ++++++++++-- src/app/tools/oll/layout.tsx | 12 ++++++++++-- tests/seo.spec.ts | 13 +++++++++++++ 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/app/tools/olf/layout.tsx b/src/app/tools/olf/layout.tsx index 4d72022..e78a5c2 100644 --- a/src/app/tools/olf/layout.tsx +++ b/src/app/tools/olf/layout.tsx @@ -1,7 +1,15 @@ import { Metadata } from "next"; import { MetaHelper } from "@/helpers/MetaHelper"; -// The page itself is a client component, so its metadata (including the canonical) lives here. +// The page itself is a client component, so its metadata (including the canonical) and its h1 live here; +// the visible title comes from PageHeader, which is not a heading. export const metadata: Metadata = MetaHelper.getMetaData("Open Lesson Format Builder - Lessons.church", "Build and preview lessons in the Open Lesson Format, a free, open JSON format for sharing church curriculum between apps.", undefined, undefined, "/tools/olf"); -export default function Layout({ children }: { children: React.ReactNode }) { return children; } +export default function Layout({ children }: { children: React.ReactNode }) { + return ( + <> +

Open Lesson Format Builder

+ {children} + + ); +} diff --git a/src/app/tools/oll/layout.tsx b/src/app/tools/oll/layout.tsx index 961daac..23ef504 100644 --- a/src/app/tools/oll/layout.tsx +++ b/src/app/tools/oll/layout.tsx @@ -1,7 +1,15 @@ import { Metadata } from "next"; import { MetaHelper } from "@/helpers/MetaHelper"; -// The page itself is a client component, so its metadata (including the canonical) lives here. +// The page itself is a client component, so its metadata (including the canonical) and its h1 live here; +// the visible title comes from PageHeader, which is not a heading. export const metadata: Metadata = MetaHelper.getMetaData("Open Lesson List Builder - Lessons.church", "Build lesson lists in the Open Lesson List format to share free church curriculum programs, studies and lessons between apps.", undefined, undefined, "/tools/oll"); -export default function Layout({ children }: { children: React.ReactNode }) { return children; } +export default function Layout({ children }: { children: React.ReactNode }) { + return ( + <> +

Open Lesson List Builder

+ {children} + + ); +} diff --git a/tests/seo.spec.ts b/tests/seo.spec.ts index ba5ee65..a408e17 100644 --- a/tests/seo.spec.ts +++ b/tests/seo.spec.ts @@ -86,6 +86,19 @@ test.describe("SEO", () => { }); } + // Both are in the sitemap but render in the browser, so these tags and the h1 come from their layouts. + for (const [path, title] of [["/tools/olf", "Open Lesson Format Builder"], ["/tools/oll", "Open Lesson List Builder"]]) { + test(`${path} describes itself`, async ({ request }) => { + const html = await (await request.get(path)).text(); + expect(html).toContain(`${title} - Lessons.church`); + expect(/]/g)].length).toBe(1); + expect(html).toMatch(new RegExp(`]*>${title}`)); + }); + } + test("search results are noindex", async ({ request }) => { const html = await (await request.get("/search?q=noah")).text(); expect(html).toMatch(/]*>`, "g"))].map((m) => /href="([^"]*)"/.exec(m[0])?.[1]); -const jsonLd = (html: string) => [...html.matchAll(/