Skip to content

Commit 5fd3fdb

Browse files
committed
shortcodes: fix Hugo version check
1 parent 7daec21 commit 5fd3fdb

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

layouts/_default/_markup/render-image.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{- $major := int (index $version 0) }}
33
{{- $minor := int (index $version 1) }}
44
{{- $id := "" }}
5-
{{- if and (ge $major 0) (ge $major 108) }}
5+
{{- if or (and (eq $major 0) (ge $minor 108)) (gt $major 0) }}
66
{{- $id = .Ordinal }}
77
{{- end }}
88
{{- partial "shortcodes/image.html" (dict

layouts/shortcodes/expand.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{- $major := int (index $version 0) }}
44
{{- $minor := int (index $version 1) }}
55
{{- $id := "" }}
6-
{{- if and (ge $major 0) (ge $major 108) }}
6+
{{- if or (and (eq $major 0) (ge $minor 108)) (gt $major 0) }}
77
{{- $id = .Ordinal }}
88
{{- end }}
99
{{- partial "shortcodes/expand.html" (dict

layouts/shortcodes/openapi.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{- $major := int (index $version 0) }}
33
{{- $minor := int (index $version 1) }}
44
{{- $id := "" }}
5-
{{- if and (ge $major 0) (ge $major 108) }}
5+
{{- if or (and (eq $major 0) (ge $minor 108)) (gt $major 0) }}
66
{{- $id = .Ordinal }}
77
{{- end }}
88
{{- partial "shortcodes/openapi.html" (dict

layouts/shortcodes/swagger.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{- $major := int (index $version 0) }}
33
{{- $minor := int (index $version 1) }}
44
{{- $id := "" }}
5-
{{- if and (ge $major 0) (ge $major 108) }}
5+
{{- if or (and (eq $major 0) (ge $minor 108)) (gt $major 0) }}
66
{{- $id = .Ordinal }}
77
{{- end }}
88
{{- partial "shortcodes/swagger.html" (dict

0 commit comments

Comments
 (0)