Skip to content

Commit

Permalink
add custom render hook
Browse files Browse the repository at this point in the history
  • Loading branch information
pbjorklund committed Nov 14, 2024
1 parent 82673bf commit 76ae3b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions layouts/_default/_markup/render-image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{- $src := .Destination -}}
{{- if not (hasPrefix $src "/") -}}
{{- $src = printf "/%s" $src -}}
{{- end -}}
<img src="{{ $src }}" alt="{{ .Text }}" />

0 comments on commit 76ae3b7

Please sign in to comment.