Skip to content

Commit 7a4d6a0

Browse files
committed
Use a different warning for preview versions
This'll match any version ending with "-preview" and show a warning that it's a preview, instead of warning that it's an old version. Signed-off-by: Nic Cope <[email protected]>
1 parent d01b615 commit 7a4d6a0

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

content/contribute/infrastructure.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ Expand the tab below to see an annotated `tree` output of the website repository
390390
│   │   │   ├── meta-common.html # <meta> tags used on all pages
391391
│   │   │   ├── ms-clarity.html # Microsoft Clarity tags
392392
│   │   │   ├── old-version-alert.html # Alert box for versions that aren't the latest
393+
│   │   │   ├── preview-version-alert.html # Alert box for preview versions
393394
│   │   │   ├── redirect.html # HTML meta redirect
394395
│   │   │   ├── release-notes.html # Release note summary page generator
395396
│   │   │   ├── rollworks.html # Rollworks analytics tags

content/v2.0-preview/get-started/install.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ title: Install Crossplane
33
weight: 100
44
---
55

6-
{{< hint "warning" >}}
7-
Crossplane v2 is a preview release.
8-
9-
**Don't use this Crossplane v2 preview in production.**
10-
{{< /hint >}}
11-
12-
136
Crossplane installs into an existing Kubernetes cluster, creating the
147
Crossplane pod.
158

themes/geekboot/layouts/partials/old-version-alert.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</div>
1010
<div class="mt-3">
1111
<p>
12-
This document applies to Crossplane version v{{ .Page.Params.version }} and not to the latest release v{{.Site.Params.latest}}.
12+
This document applies to Crossplane v{{ .Page.Params.version }} and not to the latest release v{{.Site.Params.latest}}.
1313
</p>
1414
</div>
1515
</div>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<div class="bd-callout bd-callout-danger d-flex flex-column w-100">
2+
<div class="d-flex bd-title fs-6 fw-bold border-bottom border-info">
3+
<div class="d-flex pe-3 align-self-center">
4+
<svg class="bi flex-shrink-0" role="img" aria-label="Info:"><use xlink:href="#info"/></svg>
5+
</div>
6+
<div class="d-flex">
7+
This document is for a preview version of Crossplane.
8+
</div>
9+
</div>
10+
<div class="mt-3">
11+
<p>
12+
This document applies to Crossplane v{{ .Page.Params.version }} and not to the latest release v{{.Site.Params.latest}}.
13+
<br />
14+
<br />
15+
<b>Don't use Crossplane v{{ .Page.Params.version }} in production.</b>
16+
</p>
17+
</div>
18+
</div>

themes/geekboot/layouts/partials/single-list.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ <h1 class="bd-title mb-0" id="content">{{ .Title | markdownify }}
7272

7373
{{- if eq .Page.Params.version "master" -}}
7474
{{ partialCached "master-version-alert" . }}
75+
{{- else if strings.HasSuffix $pageVer "-preview" -}}
76+
{{ partialCached "preview-version-alert" . .Section }}
7577
{{- else if ne $pageVer .Site.Params.latest -}}
7678
{{ partialCached "old-version-alert" . .Section }}
7779
{{ end }}

0 commit comments

Comments
 (0)