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:
parent
ac07833688
commit
040adb8ce7
|
@ -48,14 +48,15 @@ module.exports = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
label: `Version: latest`,
|
label: `Version: ${releases[0].replace(
|
||||||
|
/releases\/\d+\/v/,
|
||||||
|
""
|
||||||
|
)}`,
|
||||||
position: "right",
|
position: "right",
|
||||||
items: releases.map((release) => {
|
items: releases.map((release) => {
|
||||||
const subdomain = release
|
const version = release.replace(/releases\/\d+\/v/, "");
|
||||||
.replace("releases/v", "")
|
const subdomain = version.replace(".", "-");
|
||||||
.replace(".", "-");
|
const label = `Version: ${version}`;
|
||||||
const label =
|
|
||||||
"Version: " + release.replace("releases/", "");
|
|
||||||
return {
|
return {
|
||||||
label: label,
|
label: label,
|
||||||
href: `https://version-${subdomain}.goauthentik.io`,
|
href: `https://version-${subdomain}.goauthentik.io`,
|
||||||
|
|
Reference in New Issue