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