Fix homepage photo caption

This commit is contained in:
JP Hastings-Spital 2025-01-20 21:10:24 +00:00
parent bf0186a315
commit 89c14e2dae

View file

@ -50,8 +50,8 @@
{{- $src := index $picPage.Params.Media 0 -}} {{- $src := index $picPage.Params.Media 0 -}}
<a href="{{ .RelPermalink }}"><img src="{{ path.Join .RelPermalink $src.url }}" {{ with $src.alt }}alt="{{ . }}" {{ end }} /></a> <a href="{{ .RelPermalink }}"><img src="{{ path.Join .RelPermalink $src.url }}" {{ with $src.alt }}alt="{{ . }}" {{ end }} /></a>
<figcaption> <figcaption>
{{- $shortSummary := index (split .Summary "\n") 0 -}} {{- $shortSummary := index (split .Summary "</p>") 0 -}}
{{- $shortSummary | htmlUnescape }}{{ if gt (len .Summary) (len $shortSummary) }}&nbsp;<a href="{{ .RelPermalink }}"></a>{{ end -}} {{- $shortSummary | plainify | htmlUnescape | strings.TrimSpace }}&nbsp;<a href="{{ .RelPermalink }}"></a>
</figcaption> </figcaption>
</figure> </figure>
</div> </div>