fix: Prevent stable version block from appearing in platform and resources sections, closes #5262 (#5263)

pull/5264/head^2
Scott Anderson 2023-12-06 15:03:43 -07:00 committed by GitHub
parent ae3341cc70
commit 59516300b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -9,10 +9,12 @@
{{ $v2EquivalentURL := replaceRE `v[1-2]` $latestV2 .Page.Params.v2 }}
{{ $v2EquivalentPage := .GetPage (replaceRE `\/$` "" $v2EquivalentURL) }}
{{ $v2PageExists := gt (len $v2EquivalentPage.Title) 0 }}
{{ $isResources := in .Page.RelPermalink "/resources/" }}
{{ $isPlatform := in .Page.RelPermalink "/platform/" }}
{{ $isCloud := in .Page.RelPermalink "/influxdb/cloud" }}
{{ $isClustered := in .Page.RelPermalink "/influxdb/clustered" }}
{{ if and (ne $currentVersion $stableVersion) (not (or $isCloud $isClustered)) }}
{{ if and (ne $currentVersion $stableVersion) (not (or $isCloud $isClustered $isResources $isPlatform)) }}
<div class="warn block old-version">
<p>
This page documents an earlier version of {{ $productName }}.