auto-generate image captions

This commit is contained in:
David Eisinger
2025-11-19 10:57:10 -05:00
parent f469f3dbda
commit 7f24335f97
2 changed files with 25 additions and 7 deletions

View File

@@ -4,10 +4,11 @@
{{ $imgClass := .Get 2 }}
<a href="{{ $img.RelPermalink }}">
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}" class="{{ $imgClass }}">
{{ with .Inner }}
<figcaption>
{{ . }}
</figcaption>
{{ end }}
<img
src="{{ $img.RelPermalink }}"
width="{{ $img.Width }}"
height="{{ $img.Height }}"
{{ with $imgClass }}class="{{ $imgClass }}"{{ end }}
{{ with .Inner }}alt="{{ . }}"{{ end }}
>
</a>