Skip to content

Commit

Permalink
fix(home): avoid LQIP dirty data passing to the next post (mmistakes#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 authored Sep 28, 2023
1 parent e3b0163 commit 109725d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@
{% assign card_body_col = '12' %}

{% if post.image %}
{% if post.image.lqip %}
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
{% endif %}

{% assign src = post.image.path | default: post.image %}
{% unless src contains '//' %}
{% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
Expand All @@ -59,7 +55,7 @@
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}

<div class="col-md-5">
<img src="{{ src }}" alt="{{ alt }}" {{ lqip }}>
<img src="{{ src }}" alt="{{ alt }}" {% if post.image.lqip %}lqip="{{ post.image.lqip }}"{% endif %}>
</div>

{% assign card_body_col = '7' %}
Expand Down

0 comments on commit 109725d

Please sign in to comment.