Improve example of image render hook

This commit is contained in:
Cyrus Yip 2024-07-25 22:33:21 +08:00 committed by GitHub
parent 60a9306afa
commit 0300750f21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,7 +103,7 @@ To render standalone images within `figure` elements:
<img src="{{ .Destination | safeURL }}" <img src="{{ .Destination | safeURL }}"
{{- with .Text }} alt="{{ . }}"{{ end -}} {{- with .Text }} alt="{{ . }}"{{ end -}}
> >
<figcaption>{{ .Title }}</figcaption> {{- with .Title }}<figcaption>{{ . }}</figcaption>{{ end -}}
</figure> </figure>
{{- else -}} {{- else -}}
<img src="{{ .Destination | safeURL }}" <img src="{{ .Destination | safeURL }}"