Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <script type="application/ld+json"> block.
Expand Down
2 changes: 1 addition & 1 deletion site/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ permalink: /
<section class="wrap section">
<h2 class="section-title">A few to start with</h2>
<div class="card-grid">
{% for recipe in recipes | limit(8) %}
{% for recipe in recipes | withImage | limit(8) %}
{{ card(recipe) }}
{% endfor %}
</div>
Expand Down
Loading