{{ $currentVersion := (index (findRE "[^/]+.*?" .RelPermalink) 0) .RelPermalink }} {{ $stableVersion := $.Site.Data.versions.stable_version }} {{ $stableVersionURL := replaceRE "[^/]+.*?[0]" $stableVersion .RelPermalink }} {{ if lt $currentVersion $stableVersion }}

This page documents an earlier version of InfluxDB. InfluxDB {{ $stableVersion }} is the latest stable version.
View this page in the {{ $stableVersion }} documentation.

{{ else if gt $currentVersion $stableVersion }}

This page documents a pre-release version of InfluxDB. InfluxDB {{ $stableVersion }} is the latest stable version.
View this page in the {{ $stableVersion }} documentation.

{{ end }}