Skip to content

Commit

Permalink
#6 show header image in blog list
Browse files Browse the repository at this point in the history
  • Loading branch information
chraebsli authored May 13, 2024
1 parent 1ab3afd commit fa4d665
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion templates/partials/blog-list-item.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{% if page.header.hide_from_post_list != true %}
<div class="card">
{% set image = page.media.images|first %}
{# show header image if set in frontmatter #}
{% if page.header.header_image_file %}
{% set image = page.media[page.header.header_image_file] %}
{% else %}
{% set image = page.media.images|first %}
{% endif %}
{% if image and ((page.header.header_image is not defined) or (page.header.header_image)) %}
<div class="card-image">

Expand Down

0 comments on commit fa4d665

Please sign in to comment.