Oprava generování obrázků pro novou verzi Zoly

This commit is contained in:
Emil Miler 2021-09-29 20:03:54 +02:00
parent bd924f7fa3
commit 52d31b77bb

View File

@ -17,7 +17,8 @@
{% break %}
{% endif %}
{% endfor %}
<img src="{{ resize_image(path=image, width=300, height=300, op="fill") }}" alt="{{ recipe.title }}">
{% set image = resize_image(path=image, width=300, height=300, op="fill") %}
<img src="{{ image.url }}" alt="{{ recipe.title }}">
<h3>{{ recipe.title }}</h3>
{% if recipe.date %}<span class="date">{{ recipe.date | date(format="%d.%m.%Y") }}</span>{% endif %}
</a>
@ -41,7 +42,8 @@
{% macro recipe_image() %}
{% for asset in page.assets %}
{% if asset is matching("[img.](jpg|png)$") %}
<a href="/{{ asset }}"><img src="{{ resize_image(path=asset, width=900, height=400, op="fill") }}" alt="Náhled"></a>
{% set image = resize_image(path=asset, width=900, height=400, op="fill") %}
<a href="{{ get_url(path=asset) }}"><img src="{{ image.url }}" alt="Náhled"></a>
{% break %}
{% endif %}
{% endfor %}