Generate card from banner if present. Use page/section description instead of config if available (fixes #51 and #50)

This commit is contained in:
daudix
2024-08-26 06:34:24 +03:00
parent cb58a187bd
commit 4392844fc6
6 changed files with 23 additions and 7 deletions

View File

@ -0,0 +1,6 @@
{%- if page.extra.banner -%}
{% set card = resize_image(path=page.extra.banner, width=1200, height=628, op="fill") %}
{{ card.url }}
{%- else -%}
{{ get_url(path='card.png') }}
{%- endif -%}