volpe/recipes-index.njk

34 lines
No EOL
772 B
Text

---
layout: base.njk
title: All Recipes
description: All recipes on Volpe.
permalink: /recipes/
---
<h1>Recipes</h1>
{% set hasRecipes = false %}
{% for slug, recipeData in collections.recipesBySlug %}
{% if recipeData.newest %}
{% set hasRecipes = true %}
{% endif %}
{% endfor %}
{% if hasRecipes %}
<ul class="post-list">
{% for slug, recipeData in collections.recipesBySlug %}
{% if recipeData.newest %}
<li>
<a href="/recipe/{{ slug }}/" class="post-card">
<h2>{{ recipeData.newest.data.title }}</h2>
{% if recipeData.newest.data.description %}
<p>{{ recipeData.newest.data.description }}</p>
{% endif %}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% else %}
<p>No recipes yet.</p>
{% endif %}