hugo-theme-relearn/layouts/shortcodes/openapi.html
2023-05-18 14:01:50 +02:00

12 lines
No EOL
325 B
HTML

{{- $version := split hugo.Version "." }}
{{- $major := int (index $version 0) }}
{{- $minor := int (index $version 1) }}
{{- $id := "" }}
{{- if and (ge $major 0) (ge $major 108) }}
{{- $id = .Ordinal }}
{{- end }}
{{- partial "shortcodes/openapi.html" (dict
"context" .Page
"src" (.Get "src")
"id" $id
) }}