mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-04-28 20:12:44 +00:00
feat: convert images to png
This commit is contained in:
parent
971a612ab1
commit
da105625ff
@ -20,9 +20,12 @@
|
|||||||
{{ $matches := "feature,cover" }}
|
{{ $matches := "feature,cover" }}
|
||||||
{{/* Use the value from front matter if present */}}
|
{{/* Use the value from front matter if present */}}
|
||||||
{{ with .Params.featured_image }}
|
{{ with .Params.featured_image }}
|
||||||
{{/* This is the default case, the image lives in the static directory.
|
{{ $original := resources.Get . }}
|
||||||
In which case we'll use the static dir */}}
|
{{ with $original }}
|
||||||
{{ $linkToCover = trim . "/" | absURL }}
|
{{ $processed := .Process "webp" }}
|
||||||
|
{{ $linkToCover = $processed.RelPermalink }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{/* If we find a Page Resource matching the exact value, we use it instead. */}}
|
{{/* If we find a Page Resource matching the exact value, we use it instead. */}}
|
||||||
{{ with $.Resources.GetMatch . }}
|
{{ with $.Resources.GetMatch . }}
|
||||||
{{ $linkToCover = .RelPermalink }}
|
{{ $linkToCover = .RelPermalink }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user