mirror of
https://github.com/yrzam/yrzam-hugo-theme.git
synced 2025-12-12 18:49:05 +00:00
images, deterministic caching
This commit is contained in:
7
layouts/_default/_markup/render-image.html
Normal file
7
layouts/_default/_markup/render-image.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{ $hook_ctx := . }}
|
||||
{{ with .Page.Resources.Get .Destination | resources.Copy (replaceRE "([^/]*)$" "_$1" (path.Join .Page.Path .Destination)) | fingerprint }}
|
||||
<figure>
|
||||
<a href="{{ .RelPermalink }}"><img src="{{ .RelPermalink }}"></a>
|
||||
{{- with $hook_ctx.Text }}<figcaption>{{ . }}</figcaption>{{ end -}}
|
||||
</figure>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user