website: fix version dropdown and generated subdomains

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

#4437
This commit is contained in:
Jens Langhammer 2023-01-15 17:23:33 +01:00
parent a73d50d379
commit 063877a615
No known key found for this signature in database
1 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,7 @@ module.exports = {
baseUrl: "/", baseUrl: "/",
onBrokenLinks: "throw", onBrokenLinks: "throw",
favicon: "img/icon.png", favicon: "img/icon.png",
organizationName: "BeryJu", organizationName: "Authentik Security Inc.",
projectName: "authentik", projectName: "authentik",
themeConfig: { themeConfig: {
navbar: { navbar: {
@ -52,10 +52,11 @@ module.exports = {
position: "right", position: "right",
items: releases.map((release) => { items: releases.map((release) => {
const subdomain = release const subdomain = release
.replace("releases/v", "") .replace(/releases\/\d+\/v/, "")
.replace(".", "-"); .replace(".", "-");
const label = const label =
"Version: " + release.replace("releases/", ""); "Version: " +
release.replace(/releases\/\d+\/v/, "");
return { return {
label: label, label: label,
href: `https://version-${subdomain}.goauthentik.io`, href: `https://version-${subdomain}.goauthentik.io`,