chore: backport retro compatible commits for the Docusaurus v2.2 release (#8264)

Co-authored-by: Jan Peer Stoecklmair <jan.peer.stoecklmair@dynatrace.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: LittleboyHarry <littleboyharry@qq.com>
Co-authored-by: Mikey O'Toole <mikey@homotechsual.dev>
Co-authored-by: Jan Peer Stöcklmair <jan.oster94@gmail.com>
Co-authored-by: Nguyễn Thành Nam <namnguyenthanh.work@gmail.com>
Co-authored-by: Sanjaiyan Parthipan <parthipankalayini@gmail.com>
Co-authored-by: Ramazan SANCAR <ramazansancar4545@gmail.com>
Co-authored-by: mturoci <64769322+mturoci@users.noreply.github.com>
Co-authored-by: Adnan Hashmi <56730784+adnanhashmi09@users.noreply.github.com>
Co-authored-by: Pranav Joglekar <pranav2000joglekar@gmail.com>
Co-authored-by: forgeRW <20483211+forgeRW@users.noreply.github.com>
Co-authored-by: Masahiko Hara <pasora@sfc.wide.ad.jp>
Co-authored-by: Johan Fagerberg <johanringmann@gmail.com>
Co-authored-by: John Reilly <johnny_reilly@hotmail.com>
Co-authored-by: Sam Wall <oss@samuelwall.co.uk>
Co-authored-by: Jeferson S. Brito <30840709+jeferson-sb@users.noreply.github.com>
Co-authored-by: evan <evanmccarthy@outlook.com>
Co-authored-by: Xabier Lahuerta Vazquez <xlahuerta@protonmail.com>
Co-authored-by: Forresst <forresst17@gmail.com>
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
This commit is contained in:
Sébastien Lorber 2022-10-29 15:13:42 +02:00 committed by GitHub
parent 7743aa6307
commit de972142a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
155 changed files with 2822 additions and 563 deletions

View file

@ -35,12 +35,6 @@ function getNextVersionName() {
return `${expectedPrefix}${version + 1}`;
}
const allDocHomesPaths = [
'/docs/',
'/docs/next/',
...versions.slice(1).map((version) => `/docs/${version}/`),
];
const isDev = process.env.NODE_ENV === 'development';
const isDeployPreview =
@ -114,6 +108,9 @@ const config = {
},
}),
},
markdown: {
mermaid: true,
},
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/docusaurus.ico',
@ -180,9 +177,8 @@ const config = {
({
fromExtensions: ['html'],
createRedirects(routePath) {
// Redirect to /docs from /docs/introduction, as introduction has been
// made the home doc
if (allDocHomesPaths.includes(routePath)) {
// Redirect to /docs from /docs/introduction (now docs root doc)
if (routePath === '/docs' || routePath === '/docs/') {
return [`${routePath}/introduction`];
}
return [];
@ -276,6 +272,7 @@ const config = {
],
},
],
'@docusaurus/theme-mermaid',
...dogfoodingPluginInstances,
],
presets: [