diff --git a/website/docs/releases/2023/v2023.7.md b/website/docs/releases/2023/v2023.8.md similarity index 93% rename from website/docs/releases/2023/v2023.7.md rename to website/docs/releases/2023/v2023.8.md index bfeade5d0..77076c4ec 100644 --- a/website/docs/releases/2023/v2023.7.md +++ b/website/docs/releases/2023/v2023.8.md @@ -1,6 +1,6 @@ --- -title: Release 2023.7 -slug: "/releases/2023.7" +title: Release 2023.8 +slug: "/releases/2023.8" --- ## Breaking changes @@ -32,7 +32,7 @@ This release does not introduce any new requirements. To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands: ``` -wget -O docker-compose.yml https://goauthentik.io/version/2023.7/docker-compose.yml +wget -O docker-compose.yml https://goauthentik.io/version/2023.8/docker-compose.yml docker-compose up -d ``` @@ -45,7 +45,7 @@ Update your values to use the new images: ```yaml image: repository: ghcr.io/goauthentik/server - tag: 2023.7.0 + tag: 2023.8.0 ``` ## Minor changes/fixes diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index abfce3707..70ca230ca 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -1,9 +1,4 @@ const fs = require("fs").promises; -const sidebar = require("./sidebars.js"); - -const releases = sidebar.docs - .filter((doc) => doc.link?.slug === "releases")[0] - .items.filter((release) => typeof release === "string"); /** @type {import('@docusaurus/types').DocusaurusConfig} */ module.exports = async function () { @@ -21,8 +16,8 @@ module.exports = async function () { organizationName: "Authentik Security Inc.", projectName: "authentik", themeConfig: { + image: "img/social.png", navbar: { - title: "authentik", logo: { alt: "authentik logo", src: "img/icon_left_brand.svg", @@ -49,26 +44,6 @@ module.exports = async function () { label: "Pricing", position: "left", }, - { - type: "dropdown", - label: `Version: ${releases[0].replace( - /releases\/\d+\/v/, - "", - )}`, - position: "right", - items: releases.map((release) => { - const version = release.replace( - /releases\/\d+\/v/, - "", - ); - const subdomain = version.replace(".", "-"); - const label = `Version: ${version}`; - return { - label: label, - href: `https://version-${subdomain}.goauthentik.io`, - }; - }), - }, { href: "https://github.com/goauthentik/authentik", className: "header-github-link", diff --git a/website/sidebars.js b/website/sidebars.js index adfdd7041..6f5307144 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -1,5 +1,11 @@ -module.exports = { +const generateVersionDropdown = + require("./src/utils.js").generateVersionDropdown; + +const docsSidebar = { docs: [ + { + type: "html", + }, { type: "doc", id: "index", @@ -351,3 +357,6 @@ module.exports = { }, ], }; + +docsSidebar.docs[0].value = generateVersionDropdown(docsSidebar); +module.exports = docsSidebar; diff --git a/website/sidebarsDev.js b/website/sidebarsDev.js index 4cb528c34..a5043d56b 100644 --- a/website/sidebarsDev.js +++ b/website/sidebarsDev.js @@ -1,5 +1,13 @@ +const docsSidebar = require("./sidebars.js"); +const generateVersionDropdown = + require("./src/utils.js").generateVersionDropdown; + module.exports = { docs: [ + { + type: "html", + value: generateVersionDropdown(docsSidebar), + }, { type: "doc", id: "index", diff --git a/website/sidebarsIntegrations.js b/website/sidebarsIntegrations.js index 36a691d04..e7e44d64a 100644 --- a/website/sidebarsIntegrations.js +++ b/website/sidebarsIntegrations.js @@ -1,5 +1,13 @@ +const docsSidebar = require("./sidebars.js"); +const generateVersionDropdown = + require("./src/utils.js").generateVersionDropdown; + module.exports = { integrations: [ + { + type: "html", + value: generateVersionDropdown(docsSidebar), + }, { type: "category", label: "Applications", diff --git a/website/src/css/custom.css b/website/src/css/custom.css index f9aeb416f..72fc774d1 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -26,18 +26,15 @@ box-shadow: none; } -/* Don't display text title */ -.navbar__title { - display: none; -} - .navbar__logo { margin: 0 0.75rem; } /* Match color of light/dark theme switch */ -.navbar__items--right svg { +.navbar__items--right svg, +.navbar-sidebar__brand svg { color: var(--white); + stroke: var(--white); } .hero--primary { @@ -116,3 +113,27 @@ body { align-items: center; justify-content: center; } + +/* styling for version selector in sidebar */ +.theme-doc-sidebar-menu .dropdown { + display: block; + padding: 0; +} +.theme-doc-sidebar-menu .navbar__link { + color: var(--ifm-menu-color); +} +.theme-doc-sidebar-menu .dropdown__menu { + left: 0; +} +.theme-doc-sidebar-menu hr { + margin-top: calc(var(--ifm-hr-margin-vertical) / 2); +} + +/* Nav header background color on mobile */ +.navbar-sidebar__brand, +.navbar-sidebar__items { + background-color: var(--ifm-color-primary); +} +.navbar-sidebar__items .menu__link { + color: var(--white); +} diff --git a/website/src/utils.js b/website/src/utils.js new file mode 100644 index 000000000..b2d2d4938 --- /dev/null +++ b/website/src/utils.js @@ -0,0 +1,31 @@ +function generateVersionDropdown(sidebar) { + const releases = sidebar.docs + .filter((doc) => doc.link?.slug === "releases")[0] + .items.filter((release) => typeof release === "string"); + const latest = releases[0].replace(/releases\/\d+\/v/, ""); + return `
+