From 040adb8ce77d74cb54599662a9cecb829b8eb3e5 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 16 Feb 2023 14:38:27 +0100 Subject: [PATCH] website: always show build version in version dropdown Signed-off-by: Jens Langhammer #3940 # Conflicts: # website/docusaurus.config.js --- website/docusaurus.config.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index d21cf38ea..8c5a98aea 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -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`,