mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 10:04:22 +00:00
Merge pull request #305 from gethinode/develop
Exclude 'latest' label from version check
This commit is contained in:
@@ -3,10 +3,9 @@
|
|||||||
{{- $.Scratch.Set "version" $version -}}
|
{{- $.Scratch.Set "version" $version -}}
|
||||||
{{ with partial "utilities/GetMenu" (dict "page" . "version" $version) }}{{ $.Scratch.Set "sidebar" . }}{{ end }}
|
{{ with partial "utilities/GetMenu" (dict "page" . "version" $version) }}{{ $.Scratch.Set "sidebar" . }}{{ end }}
|
||||||
|
|
||||||
{{- if site.Params.docs.checkVersion -}}
|
{{- if and site.Params.docs.checkVersion $version -}}
|
||||||
{{ with $version }}
|
{{- if ne $version "latest" -}}
|
||||||
{{- $isOlder := partial "utilities/IsOlder" (dict "current" .) -}}
|
{{- if partial "utilities/IsOlder" (dict "current" $version) -}}
|
||||||
{{- if $isOlder }}
|
|
||||||
{{- $.Scratch.Set "pageAlertMsg" (T "newerVersionAlert" site.Title) -}}
|
{{- $.Scratch.Set "pageAlertMsg" (T "newerVersionAlert" site.Title) -}}
|
||||||
{{- $.Scratch.Set "pageAlertURL" (or site.Params.docs.latestURL site.baseURL) -}}
|
{{- $.Scratch.Set "pageAlertURL" (or site.Params.docs.latestURL site.baseURL) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@@ -1,7 +0,0 @@
|
|||||||
{{ with .version }}
|
|
||||||
{{- $isOlder := partial "utilities/IsOlder" (dict "current" .) -}}
|
|
||||||
{{- if $isOlder }}
|
|
||||||
{{- $.Scratch.Set "pageAlertMsg" (printf "There is a newer version of %s!" site.Title) -}}
|
|
||||||
{{- $.Scratch.Set "pageAlertURL" "https://getbootstrap.com/docs" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
Reference in New Issue
Block a user