mirror of https://github.com/crossplane/docs.git
feat: add ability to mark versions as hidden
We want to continue serving the v2.0-preview content (there are a lot of links to it floating around out there), but it is very confusing to see it in the drop down. This commit marks the v2.0-preview version as hidden from the version drop down selector, while still serving them in the case someone uses the direct URL. Signed-off-by: Jared Watts <jbw976@gmail.com>
This commit is contained in:
parent
84131c1ffb
commit
b63d34e6a0
|
@ -3,6 +3,7 @@ title: "Welcome"
|
|||
weight: -1
|
||||
cascade:
|
||||
version: "2.0-preview"
|
||||
hidden: true
|
||||
---
|
||||
|
||||
Welcome to the Crossplane documentation. Crossplane is a control plane framework
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
<!-- get all the versions and break out semver order -->
|
||||
{{ range .Site.Sections }}
|
||||
{{/* Skip versions marked as hidden */}}
|
||||
{{ if not .Page.Params.hidden }}
|
||||
{{ if eq .Page.Params.version "master" }}
|
||||
{{$sorted_list = $sorted_list | append "master" }}
|
||||
{{ else if ne .Page.Params.version nil }}
|
||||
|
@ -18,6 +20,7 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range sort ($majorlist | uniq) "value" "desc" }}
|
||||
{{ $majorver := . }}
|
||||
|
|
Loading…
Reference in New Issue