hugo: Display images a figures

This commit is contained in:
Jan Kremer 2026-01-13 07:40:34 +01:00
parent 564fcf8038
commit 988507af98
No known key found for this signature in database
5 changed files with 34 additions and 13 deletions

View file

@ -207,11 +207,9 @@ article {
margin: 0;
figcaption {
p {
margin: 0.25rem 0 2rem;
font-family: var(--sans-serif);
text-align: center;
}
margin: 0.25rem 0 2rem;
font-family: var(--sans-serif);
text-align: center;
}
}

View file

@ -5,4 +5,4 @@ description: "über Regensburg"
tags: [fotos, regensburg]
---
{{< figure src="abendliche-bewoelkung.webp" alt="Abendliche Bewölkung über Regensburg" caption="Abendliche Bewölkung über Regensburg" loading="lazy" >}}
![Abendliche Bewölkung über Regensburg](./abendliche-bewoelkung.webp "Abendliche Bewölkung über Regensburg")

View file

@ -5,10 +5,16 @@ date: 2025-11-15T21:53:01+01:00
tags: [fotos, polen]
---
{{< figure src="holzwall.jpeg" alt="Holzwall" caption="Holzwall" loading="lazy" decoding="async" fetchpriority="high" >}}
{{< figure src="pfote.jpeg" alt="Pfote" caption="Pfote" loading="lazy" >}}
{{< figure src="nala.jpeg" alt="Nala" caption="Nala" loading="lazy" >}}
{{< figure src="pier.jpeg" alt="Pier" caption="Pier" loading="lazy" >}}
{{< figure src="dom-1.jpeg" alt="Kolberger Dom" caption="Kolberger Dom" loading="lazy" >}}
{{< figure src="dom-2.jpeg" alt="Dom" caption="Dom" loading="lazy" >}}
{{< figure src="moeve.jpeg" alt="Möve" caption="Möve" loading="lazy" >}}
![Holzwall](./holzwall.jpeg "Holzwall")
![Pfote](./pfote.jpeg "Pfote")
![Nala](./nala.jpeg "Nala")
![Pier](./pier.jpeg "Pier")
![Kolberger Dom](./dom-1.jpeg "Kolberger Dom")
![Dom](./dom-2.jpeg "Dom")
![Möve](./moeve.jpeg "Möve")

View file

@ -8,6 +8,8 @@ enableGitInfo = true
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
[markup.goldmark.parser]
wrapStandAloneImageWithinParagraph = false
[markup.highlight]
style = "rose-pine-dawn"

View file

@ -0,0 +1,15 @@
{{- if .IsBlock -}}
<figure>
<img
src="{{ .Destination | safeURL }}"
{{- with .PlainText }}alt="{{ . }}"{{ end -}}
/>
{{- with .Title }}<figcaption>{{ . }}</figcaption>{{ end -}}
</figure>
{{- else -}}
<img
src="{{ .Destination | safeURL }}"
{{- with .PlainText }}alt="{{ . }}"{{ end -}}
{{- with .Title }}title="{{ . }}"{{ end -}}
/>
{{- end -}}