Generate covers for pages without a cover
After todo covers landed, the home page still showed five cards with nothing above the title: /features/, /daler/, /reports/, /glossary/ and /reports/audit-meta-refactoring/. PostPreview only drew a generated picture for items with a todo state; an
article without cover fell through every branch.
Approach
src/lib/page-cover.jsrenders the shared generative background seeded by the page path, with a hue from the same seed.getPathColor()is also what the OG image uses, so a page's listing cover and its social card matchsrc/routes/cover/[...path]/+server.jsprerenderscover/<path>.svgfor every page that has neithercovernorstatePostPreviewfalls back to that image when no cover was passed; todo items keep their state-coloured cover and badge
Tasks
- Add the module with tests and the prerendered route
- Add the fallback branch in
PostPreview - Update CLAUDE.md
Read next
