From bd6aa7a09d6340df09351f097eac2d3200bdbef0 Mon Sep 17 00:00:00 2001 From: Joe Hutchinson Date: Mon, 21 Jan 2019 12:52:17 -0500 Subject: [PATCH] Update li to support webp --- layouts/_default/li-next.html | 8 +++++++- layouts/_default/li.html | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/layouts/_default/li-next.html b/layouts/_default/li-next.html index 715e98f..eb8082d 100644 --- a/layouts/_default/li-next.html +++ b/layouts/_default/li-next.html @@ -3,7 +3,13 @@ {{ if isset .Params "featuredimage" }}

Next Article

- + + {{ if (fileExists (printf "%s/%s" "static" (replace (.Params.featuredimage) (path.Ext .Params.featuredimage) ".webp"))) -}} + + {{- end }} + + +
{{ end }}
diff --git a/layouts/_default/li.html b/layouts/_default/li.html index 7f1f563..067ed3f 100644 --- a/layouts/_default/li.html +++ b/layouts/_default/li.html @@ -2,7 +2,13 @@ href="{{ .Permalink }}" class="card blog-card" rel="bookmark" > {{ if isset .Params "featuredimage" }}
- + + {{ if (fileExists (printf "%s/%s" "static" (replace (.Params.featuredimage) (path.Ext .Params.featuredimage) ".webp"))) -}} + + {{- end }} + + +
{{ end }}