diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 9d2cde45..afa00a91 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,10 +3,9 @@ {{- $.Scratch.Set "version" $version -}} {{ with partial "utilities/GetMenu" (dict "page" . "version" $version) }}{{ $.Scratch.Set "sidebar" . }}{{ end }} -{{- if site.Params.docs.checkVersion -}} - {{ with $version }} - {{- $isOlder := partial "utilities/IsOlder" (dict "current" .) -}} - {{- if $isOlder }} +{{- if and site.Params.docs.checkVersion $version -}} + {{- if ne $version "latest" -}} + {{- if partial "utilities/IsOlder" (dict "current" $version) -}} {{- $.Scratch.Set "pageAlertMsg" (T "newerVersionAlert" site.Title) -}} {{- $.Scratch.Set "pageAlertURL" (or site.Params.docs.latestURL site.baseURL) -}} {{- end -}} diff --git a/layouts/partials/utilities/CheckVersion.html b/layouts/partials/utilities/CheckVersion.html deleted file mode 100644 index 1fe294ae..00000000 --- a/layouts/partials/utilities/CheckVersion.html +++ /dev/null @@ -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 -}}