Skip to content

Commit

Permalink
try to workaround jekyll/mm limitation with webp
Browse files Browse the repository at this point in the history
  • Loading branch information
willingc committed Apr 12, 2024
1 parent 3e8259b commit 1a87a69
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions _includes/page__hero.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{% assign img = include.img %}
<picture>
<source type="image/webp" srcset="/assets/images/posts/{{ page.slug }}/{{ img }}.webp" >
<img src="/assets/images/posts/{{ page.slug }}/{{ img }}.{{ include.ext }}" alt="{{ include.alt }}" />
</picture>

{% capture overlay_img_path %}{{ page.header.overlay_image | relative_url }}{% endcapture %}


{% if page.header.overlay_filter contains "gradient" %}
{% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %}
{% elsif page.header.overlay_filter contains "rgba" %}
Expand Down
5 changes: 5 additions & 0 deletions _includes/picture.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% assign img = include.img %}
<picture>
<source type="image/webp" srcset="/assets/images/posts/{{ page.slug }}/{{ img }}.webp" >
<img src="/assets/images/posts/{{ page.slug }}/{{ img }}.{{ include.ext }}" alt="{{ include.alt }}" />
</picture>

0 comments on commit 1a87a69

Please sign in to comment.