diff --git a/docs/releases/overview.md b/docs/releases/overview.md deleted file mode 100644 index abc8d483e2..0000000000 --- a/docs/releases/overview.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -id: overview -title: Overview -description: Overview of the Backstage Releases ---- - -Things have been released! diff --git a/microsite/sidebars.json b/microsite/sidebars.json index 02344ffb7a..03cb2a965f 100644 --- a/microsite/sidebars.json +++ b/microsite/sidebars.json @@ -1,14 +1,7 @@ { "releases": { - "Releases": [ - "releases/overview", - { - "type": "subcategory", - "label": "Release Notes", - "ids": [ - "releases/v1.0.0" - ] - } + "Release Notes": [ + "releases/v1.0.0" ] }, "docs": { diff --git a/microsite/siteConfig.js b/microsite/siteConfig.js index 794349d815..2e440ff955 100644 --- a/microsite/siteConfig.js +++ b/microsite/siteConfig.js @@ -8,6 +8,19 @@ // See https://docusaurus.io/docs/site-config for all the possible // site configuration options. +// This figures out what the most recent release version is, so that we can link to it in the header +const [{name: latestRelease}] = require('fs').readdirSync(require('path').resolve(__dirname, '../docs/releases')).map(file => { + const match = file.match(/^v(\d+)\.(\d+)\.(\d+)\.md$/) + if (!match) { + return undefined + } + const parts = match.slice(1).map(v => parseInt(v, 10)) + return { + name: file.slice(0, file.length - '.md'.length), + weight: parts[0]*1000000 + parts[1]*1000 + parts[2], + } +}).filter(Boolean).sort((a, b) => b.weight - a.weight); + const siteConfig = { title: 'Backstage Software Catalog and Developer Platform', // Title for your website. tagline: 'An open platform for building developer portals', @@ -45,7 +58,7 @@ const siteConfig = { label: 'Blog', }, { - doc: 'releases/overview', + doc: `releases/${latestRelease}`, href: '/releases', label: 'Releases', },