From 51273aa2f025bc7539f811824c68a49b36ad3b46 Mon Sep 17 00:00:00 2001 From: blam Date: Mon, 2 Sep 2024 09:13:43 +0200 Subject: [PATCH] chore: fix prettier Signed-off-by: blam --- microsite/docusaurus.config.ts | 182 +++++++++++++++++---------------- 1 file changed, 93 insertions(+), 89 deletions(-) diff --git a/microsite/docusaurus.config.ts b/microsite/docusaurus.config.ts index fcac2973dc..96edb57dea 100644 --- a/microsite/docusaurus.config.ts +++ b/microsite/docusaurus.config.ts @@ -21,7 +21,7 @@ import { themes } from 'prism-react-renderer'; import type * as Preset from '@docusaurus/preset-classic'; import { Config } from '@docusaurus/types'; -import RedirectPlugin from '@docusaurus/plugin-client-redirects' +import RedirectPlugin from '@docusaurus/plugin-client-redirects'; const backstageTheme = themes.vsDark; backstageTheme.plain.backgroundColor = '#232323'; @@ -39,16 +39,19 @@ const PatchedRedirectPlugin: typeof RedirectPlugin = (ctx, opts) => { try { await plugin.postBuild(...args); } catch (error) { - if (error.message === 'The redirect plugin is not supposed to override existing files.') { + if ( + error.message === + 'The redirect plugin is not supposed to override existing files.' + ) { // Bit of a hack to make sure all remaining redirects are written, since the write uses Promise.all await new Promise(resolve => setTimeout(resolve, 1000)); } else { - throw error + throw error; } } - } - } -} + }, + }; +}; const config: Config = { title: 'Backstage Software Catalog and Developer Platform', @@ -165,89 +168,90 @@ const config: Config = { }; }, }), - ctx => PatchedRedirectPlugin(ctx, { - id: '@docusaurus/plugin-client-redirects', - toExtensions: [], - fromExtensions: [], - redirects: [ - { - from: '/docs', - to: '/docs/overview/what-is-backstage', - }, - { - from: '/docs/features/software-catalog/software-catalog-overview', - to: '/docs/features/software-catalog/', - }, - { - from: '/docs/features/software-templates/software-templates-index', - to: '/docs/features/software-templates/', - }, - { - from: '/docs/features/techdocs/techdocs-overview', - to: '/docs/features/techdocs/', - }, - { - from: '/docs/features/kubernetes/overview', - to: '/docs/features/kubernetes/', - }, - { - from: '/docs/features/search/search-overview', - to: '/docs/features/search/', - }, - { - from: '/docs/getting-started/running-backstage-locally', - to: '/docs/getting-started/', - }, - { - from: '/docs/features/software-templates/testing-scaffolder-alpha', - to: '/docs/features/software-templates/migrating-to-rjsf-v5', - }, - { - from: '/docs/auth/glossary', - to: '/docs/references/glossary', - }, - { - from: '/docs/overview/glossary', - to: '/docs/references/glossary', - }, - { - from: '/docs/getting-started/create-an-app', - to: '/docs/getting-started/', - }, - { - from: '/docs/getting-started/configuration', - to: '/docs/getting-started/#next-steps', - }, - { - from: '/docs/features/software-templates/authorizing-parameters-steps-and-actions', - to: '/docs/features/software-templates/authorizing-scaffolder-template-details', - }, - { - from: '/docs/local-dev/cli-commands/', - to: '/docs/tooling/cli/commands/', - }, - { - from: '/docs/local-dev/cli-build-system/', - to: '/docs/tooling/cli/build-system/', - }, - { - from: '/docs/local-dev/cli-overview/', - to: '/docs/tooling/cli/overview/', - }, - { - from: '/docs/local-dev/linking-local-packages/', - to: '/docs/tooling/local-dev/linking-local-packages', - }, - { - from: '/docs/local-dev/debugging/', - to: '/docs/tooling/local-dev/debugging', - }, - { - from: '/docs/plugins/url-reader/', - to: '/docs/backend-system/core-services/url-reader', - }, - ] - }), + ctx => + PatchedRedirectPlugin(ctx, { + id: '@docusaurus/plugin-client-redirects', + toExtensions: [], + fromExtensions: [], + redirects: [ + { + from: '/docs', + to: '/docs/overview/what-is-backstage', + }, + { + from: '/docs/features/software-catalog/software-catalog-overview', + to: '/docs/features/software-catalog/', + }, + { + from: '/docs/features/software-templates/software-templates-index', + to: '/docs/features/software-templates/', + }, + { + from: '/docs/features/techdocs/techdocs-overview', + to: '/docs/features/techdocs/', + }, + { + from: '/docs/features/kubernetes/overview', + to: '/docs/features/kubernetes/', + }, + { + from: '/docs/features/search/search-overview', + to: '/docs/features/search/', + }, + { + from: '/docs/getting-started/running-backstage-locally', + to: '/docs/getting-started/', + }, + { + from: '/docs/features/software-templates/testing-scaffolder-alpha', + to: '/docs/features/software-templates/migrating-to-rjsf-v5', + }, + { + from: '/docs/auth/glossary', + to: '/docs/references/glossary', + }, + { + from: '/docs/overview/glossary', + to: '/docs/references/glossary', + }, + { + from: '/docs/getting-started/create-an-app', + to: '/docs/getting-started/', + }, + { + from: '/docs/getting-started/configuration', + to: '/docs/getting-started/#next-steps', + }, + { + from: '/docs/features/software-templates/authorizing-parameters-steps-and-actions', + to: '/docs/features/software-templates/authorizing-scaffolder-template-details', + }, + { + from: '/docs/local-dev/cli-commands/', + to: '/docs/tooling/cli/commands/', + }, + { + from: '/docs/local-dev/cli-build-system/', + to: '/docs/tooling/cli/build-system/', + }, + { + from: '/docs/local-dev/cli-overview/', + to: '/docs/tooling/cli/overview/', + }, + { + from: '/docs/local-dev/linking-local-packages/', + to: '/docs/tooling/local-dev/linking-local-packages', + }, + { + from: '/docs/local-dev/debugging/', + to: '/docs/tooling/local-dev/debugging', + }, + { + from: '/docs/plugins/url-reader/', + to: '/docs/backend-system/core-services/url-reader', + }, + ], + }), [ 'docusaurus-pushfeedback', {