diff --git a/website/assets/scss/_variables_project.scss b/website/assets/scss/_variables_project.scss index 49f3e011ab07..4be33270ed7e 100644 --- a/website/assets/scss/_variables_project.scss +++ b/website/assets/scss/_variables_project.scss @@ -64,5 +64,4 @@ nav.navbar-dark { code.provisioner { color: $light; } -} - +} \ No newline at end of file diff --git a/website/config.toml b/website/config.toml index 6118737db76d..c17688d7e7a5 100644 --- a/website/config.toml +++ b/website/config.toml @@ -80,6 +80,7 @@ images = ["banner.png"] # Menu title if your navbar has a versions selector to access old versions of your site. # This menu appears only if you have at least one [params.versions] set. version_menu = "Releases" + # Flag used in the "version-banner" partial to decide whether to display a # banner on every page indicating that this is an archived version of the docs. # Set this flag to "true" if you want to display the banner. @@ -134,15 +135,10 @@ url = "https://github.com/aws/karpenter" pre = "" # Add your release versions here -[[params.versions]] - version = "latest" - url = "https://karpenter.sh/docs/" - [[params.versions]] version = "v0.5.0" - url = "https://karpenter.sh/docs/" + url = "/docs/" [[params.versions]] version = "v0.4.3" - url = "https://karpenter.sh/v0.4.3-docs/" - + url = "/v0.4.3-docs/" \ No newline at end of file diff --git a/website/layouts/partials/navbar-version-selector.html b/website/layouts/partials/navbar-version-selector.html new file mode 100644 index 000000000000..e8ca0f538600 --- /dev/null +++ b/website/layouts/partials/navbar-version-selector.html @@ -0,0 +1,19 @@ +{{ $pageDir := index (split (path.Dir .Page.RelPermalink) "/") 1 }} + +{{ if eq $pageDir "" }} + {{ $pageDir = "docs" }} +{{ end }} +{{ $currentDocVer := $pageDir }} +{{ range .Site.Params.versions }} + {{ if eq .url (printf "/%s/" $pageDir) }} + {{ $currentDocVer = .version }} + {{ end }} +{{ end }} + + diff --git a/website/layouts/partials/navbar.html b/website/layouts/partials/navbar.html new file mode 100644 index 000000000000..58797788417b --- /dev/null +++ b/website/layouts/partials/navbar.html @@ -0,0 +1,38 @@ +{{ $cover := .HasShortcode "blocks/cover" }} + \ No newline at end of file