hugo: Display images a figures
This commit is contained in:
parent
564fcf8038
commit
988507af98
5 changed files with 34 additions and 13 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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" >}}
|
||||

|
||||
|
|
|
|||
|
|
@ -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" >}}
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ enableGitInfo = true
|
|||
[markup.goldmark]
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
[markup.goldmark.parser]
|
||||
wrapStandAloneImageWithinParagraph = false
|
||||
[markup.highlight]
|
||||
style = "rose-pine-dawn"
|
||||
|
||||
|
|
|
|||
15
layouts/_markup/render-image.html
Normal file
15
layouts/_markup/render-image.html
Normal 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 -}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue