From 1d10afa2097f579f5e4680c69496e938c2b9a8bc Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 15 Jun 2022 21:43:44 +0200 Subject: [PATCH] website/docs: add version dropdown for subdomains Signed-off-by: Jens Langhammer --- website/docs/releases/v0.10.md | 2 +- website/docusaurus.config.js | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/website/docs/releases/v0.10.md b/website/docs/releases/v0.10.md index 191b483950..98e52edb8e 100644 --- a/website/docs/releases/v0.10.md +++ b/website/docs/releases/v0.10.md @@ -13,7 +13,7 @@ This update brings a lot of big features, such as: Due to this new OAuth2 Provider, the Application Gateway Provider, now simply called "Proxy Provider" has been revamped as well. The new authentik Proxy integrates more tightly with authentik via the new Outposts system. The new proxy also supports multiple applications per proxy instance, can configure TLS based on authentik Keypairs, and more. - See [Proxy](../providers/proxy/proxy.md) + See [Proxy](../providers/proxy/index.md) - Outpost System diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 94c8ad397b..9da48f7329 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -1,3 +1,10 @@ +const sidebar = require("./sidebars.js"); + +const releases = sidebar.docs + .filter((doc) => doc.link?.slug === "releases")[0] + .items.filter((release) => typeof release === "string"); +const latestVersion = releases[0].replace("releases/v", ""); + module.exports = { title: "authentik", tagline: "Making authentication simple.", @@ -39,6 +46,20 @@ module.exports = { label: "API", position: "left", }, + { + type: "dropdown", + label: `Version ${latestVersion}`, + position: "right", + items: releases.map((release) => { + const subdomain = release + .replace("releases/v", "") + .replace(".", "-"); + return { + label: release.replace("releases/", ""), + href: `https://version-${subdomain}.goauthentik.io`, + }; + }), + }, { href: "https://github.com/goauthentik/authentik", label: "GitHub",