From 77c7ac0ddb4cb6a926701baf337130b55af77458 Mon Sep 17 00:00:00 2001 From: slorber Date: Wed, 3 Jun 2020 18:15:12 +0200 Subject: [PATCH] add more redirect tests to d2 site config --- website/docusaurus.config.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index ad4c2352a8..21b565b1f2 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -29,15 +29,29 @@ module.exports = { { to: '/', from: [ - '/plugin-client-redirects/test1', - '/plugin-client-redirects/test2', + '/plugin-client-redirects-tests/toHome1', + '/plugin-client-redirects-tests/toHome2', ], }, { to: '/docs', - from: '/plugin-client-redirects/test3', + from: '/plugin-client-redirects-tests/toDocs1', + }, + { + to: '/docs', + from: '/plugin-client-redirects-tests/toDocs2', }, ], + createRedirects: function (existingPath) { + if (existingPath === '/') { + return [ + [ + '/plugin-client-redirects-tests/toHome3', + '/plugin-client-redirects-tests/toHome4', + ], + ]; + } + }, }, ], [