From c279e8402651cce96b7661a9684efd41c53d61ff Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 17:12:50 +0000 Subject: [PATCH] Site: feature only recipes with photos on the landing page Add a withImage Eleventy filter and apply it to the 'A few to start with' row so it never shows placeholder tiles. Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_01HpG2vky2XhDtfc6y16TRis --- CHANGELOG.md | 4 ++++ eleventy.config.js | 3 +++ site/index.njk | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8064115..ca58ca1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -420,6 +420,10 @@ Recipe imports are logged both here (summary) and in ### Changed +- **Site landing page: the "A few to start with" row now shows only recipes that have + a photo** (via a new `withImage` filter), so the featured strip has no placeholder + tiles. + - **Friendlier generated indexes and per-recipe navigation.** Each category README, the recipe index (`recipes/README.md`), and the tag index (`recipes/tags.md`) now open with a short welcome line and a navigation row diff --git a/eleventy.config.js b/eleventy.config.js index 171ccab..6115f4c 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -19,6 +19,9 @@ export default function (eleventyConfig) { } eleventyConfig.addFilter("limit", (arr, n) => (arr || []).slice(0, n)); + eleventyConfig.addFilter("withImage", (arr) => + (arr || []).filter((r) => r.heroImage), + ); // schema.org/Recipe structured data for a recipe, as an escaped JSON string // safe to drop into a