Fix hugo layout in hugo > ~0.130.0

For some reason, newer hugo versions have trouble with .summary, and on
some pages where .summary is not defined in the page header metadata,
when rendering the page as a preview card, hugo swallows the card's
closing </div> tag. Such a weird bug, we now just work around it by
explicitly setting the .summary meta on pages that cause this bug(?) to
surface.
This commit is contained in:
jaseg 2025-06-30 15:35:25 +02:00
parent a324ba7b64
commit 16655c00e0
11 changed files with 34 additions and 13 deletions

View file

@ -3,7 +3,7 @@
{{- if and .Date (not (isset (index .Ancestors 0).Params "hide_date")) }}<strong>{{ .Date.Format "2006-01-02" }}</strong>{{- end }}
<div class="summary">
{{ .Summary | safeHTML }}
{{ .Summary }}
<a href="{{ .Permalink }}">Read more</a>
</div>