From 0fc52fed39bf6f5e7b84e6f2debf51537067fe8d Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 15 Mar 2022 09:34:26 +0100 Subject: [PATCH] Run prettier Signed-off-by: blam --- microsite/sidebars.json | 4 +--- microsite/siteConfig.js | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/microsite/sidebars.json b/microsite/sidebars.json index 03cb2a965f..8f8d180002 100644 --- a/microsite/sidebars.json +++ b/microsite/sidebars.json @@ -1,8 +1,6 @@ { "releases": { - "Release Notes": [ - "releases/v1.0.0" - ] + "Release Notes": ["releases/v1.0.0"] }, "docs": { "Overview": [ diff --git a/microsite/siteConfig.js b/microsite/siteConfig.js index 2e440ff955..6e291aa994 100644 --- a/microsite/siteConfig.js +++ b/microsite/siteConfig.js @@ -9,17 +9,21 @@ // 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 [{ 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.