Skip to content

Give every page its own meta description - #65

Merged
lexler merged 2 commits into
mainfrom
feat/page-descriptions
Oct 30, 2026
Merged

lexler merged 2 commits into
mainfrom
feat/page-descriptions

Conversation

@lexler

@lexler lexler commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Every page used to share the site-wide description. Each page now has its own.

Stacked on #63 (base: fix/36-unique-page-titles). The title/description conflicts are resolved in this branch: each page's metadata returns both title and description. Merge #63 first; GitHub will then retarget this PR to main.

How

  • Pattern pages: extractSummary(pattern.content), the same opening-paragraph summary the Complete Catalog shows. extractSummary moves from app/pattern-catalog/page.tsx to lib/markdown.ts so both use it.
  • extractSummary now skips a leading Related: / Closely related: line, so it uses the first real paragraph. Feedback Loop was described as "Closely related: "Engineer the Harness""; it's now "Set up automated feedback, give AI permission to iterate autonomously until a goal is reached." The catalog card summary changes the same way.
  • Home, contributors: their intro paragraph, stored in a constant that the page also renders.
  • Category pages: listDescription from getCategoryConfig, which is the intro the page shows.
  • Contributor pages: "Patterns, anti-patterns, and obstacles contributed by ."
  • Pattern catalog and talk have no intro paragraph, so they get short fixed descriptions.

Tests

  • 6 "Page descriptions" unit tests in pages.test.tsx and 2 extractSummary tests in markdown.test.ts, each written first and seen failing. Intro-text tests compare the metadata to the rendered paragraph, so the two can't drift apart.
  • ./test.sh: 387 passed. npm run lint: 0 errors, 0 warnings.
  • ./e2e.sh: 85 passed, 8 failed, 9 skipped. All 8 failures are iPhone/WebKit search tests from the pre-hydration bug fixed in Keep search text typed before the page finishes loading #64, which this branch doesn't include. Desktop and Android pass.

ampagent and others added 2 commits October 30, 2026 14:30
Pattern pages use the same opening-paragraph summary the catalog shows;
extractSummary moves to lib/markdown so both share it. Other pages use
their intro text, stored once and rendered by the page too.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18b16-89b6-7301-9d0c-e6ff7f681d32
Co-authored-by: Lada Kesseler <archie.kesseler@gmail.com>
extractSummary skipped headings, lists and quotes but not a leading
"Related:" or "Closely related:" line, so Feedback Loop was described by
its related-reading link instead of its opening paragraph.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18b16-89b6-7301-9d0c-e6ff7f681d32
Co-authored-by: Lada Kesseler <archie.kesseler@gmail.com>
@lexler
lexler changed the base branch from main to fix/36-unique-page-titles October 30, 2026 14:35
@lexler
lexler force-pushed the feat/page-descriptions branch from 3690aaa to cd8e7e1 Compare October 30, 2026 14:35
@lexler
lexler changed the base branch from fix/36-unique-page-titles to main October 30, 2026 16:38
@lexler
lexler merged commit 8c093da into main Oct 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants