website: always show build version in version dropdown

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

#3940

# Conflicts:
#	website/docusaurus.config.js
This commit is contained in:
Jens Langhammer 2023-02-16 14:38:27 +01:00
parent ac07833688
commit 040adb8ce7
No known key found for this signature in database

View file

@ -48,14 +48,15 @@ module.exports = {
},
{
type: "dropdown",
label: `Version: latest`,
label: `Version: ${releases[0].replace(
/releases\/\d+\/v/,
""
)}`,
position: "right",
items: releases.map((release) => {
const subdomain = release
.replace("releases/v", "")
.replace(".", "-");
const label =
"Version: " + release.replace("releases/", "");
const version = release.replace(/releases\/\d+\/v/, "");
const subdomain = version.replace(".", "-");
const label = `Version: ${version}`;
return {
label: label,
href: `https://version-${subdomain}.goauthentik.io`,