-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add version dropdown and deprecation notice
This is a forward-port of #1606 and #1608 in preparation of the 2.1 release. I took the partial that's part of this change from the Docsy sources and slightly modified it to have the "deprecation-warning" class and some additional text. The original can be found here: https://github.com/google/docsy/blob/3f3172a190ac9b24aa5b9c695f62c3fee8273ac2/layouts/partials/version-banner.html This commit also moves the link to Flagger into the top navbar so that we can actually use the version drop-down for listing Flux versions. A dedicated "Documentation" link in the top navbar now directs users to the Flux documentation. The link to GitHub is also removed to make the navbar be closer to the one at kubernetes.io. Signed-off-by: Max Jonas Werner <[email protected]>
- Loading branch information
Max Jonas Werner
committed
Aug 10, 2023
1 parent
63db70f
commit 84411be
Showing
8 changed files
with
75 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" | ||
aria-haspopup="true" aria-expanded="false"> | ||
{{ .Site.Params.version_menu }} | ||
</a> | ||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | ||
{{ $path := "" }} | ||
{{ if .Site.Params.version_menu_pagelinks }} | ||
{{ $path = .Page.RelPermalink }} | ||
{{ end }} | ||
<a class="dropdown-item" href="/flux/releases">Release Information</a> | ||
{{ range .Site.Params.versions }} | ||
<a class="dropdown-item" href="{{ .url }}{{ $path }}">{{ .version }}</a> | ||
{{ end }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- Check the variable that indicates whether this is an archived doc set. | ||
If yes, display a banner. --> | ||
{{ if .Site.Params.archived_version }} | ||
{{ $color := "primary" }} | ||
{{ $latest_version := .Site.Params.url_latest_version }} | ||
{{ $current_version := .Site.Params.version }} | ||
<div class="pageinfo pageinfo-{{ $color }} deprecation-warning"> | ||
<h3>You are viewing documentation for Flux version: {{ $current_version }}</h3> | ||
{{ with $current_version }}<p>Version {{ . | markdownify }} of the | ||
documentation is no longer actively maintained. The site that you are | ||
currently viewing is an archived snapshot. | ||
{{ with $latest_version }}For up-to-date documentation, see the | ||
<a href="{{ $latest_version | safeURL }}" target="_blank">latest version</a>.</p> | ||
{{ end }} | ||
{{ end }} | ||
</div> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters