hugo-theme-relearn/layouts/_default/_markup/render-image.html
2023-05-25 12:43:10 +02:00

14 lines
No EOL
364 B
HTML

{{- $version := split hugo.Version "." }}
{{- $major := int (index $version 0) }}
{{- $minor := int (index $version 1) }}
{{- $id := "" }}
{{- if or (and (eq $major 0) (ge $minor 108)) (gt $major 0) }}
{{- $id = .Ordinal }}
{{- end }}
{{- partial "shortcodes/image.html" (dict
"context" .Page
"url" .Destination
"title" .Title
"alt" .Text
"id" $id
) }}