Skip to content

Commit 0fa7866

Browse files
committed
take 2
1 parent c345963 commit 0fa7866

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

docusaurus.config.en.js

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,6 @@ const config = {
160160
beforeDefaultRemarkPlugins: [fixLinks],
161161
rehypePlugins: [katex],
162162
},
163-
async redirects() {
164-
const redirects = [];
165-
if (process.env.VERCEL_ENV === 'preview') {
166-
redirects.push({
167-
from: '/',
168-
to: '/docs',
169-
});
170-
}
171-
return redirects;
172-
},
173163
blog: {
174164
path: "knowledgebase",
175165
blogTitle: "ClickHouse Knowledge Base",
@@ -332,12 +322,17 @@ const config = {
332322
},
333323
};
334324
},
335-
// [
336-
// N.B - If you need to redirect a page please do so from vercel.json
337-
// '@docusaurus/plugin-client-redirects',
338-
// {
339-
// },
340-
// ],
325+
[
326+
'@docusaurus/plugin-client-redirects',
327+
{
328+
redirects: process.env.VERCEL_ENV === 'preview' ? [
329+
{
330+
from: '/',
331+
to: '/docs',
332+
},
333+
] : [],
334+
},
335+
],
341336
[
342337
"vercel-analytics",
343338
{
@@ -388,4 +383,4 @@ const config = {
388383

389384
};
390385

391-
module.exports = config;
386+
module.exports = config;

0 commit comments

Comments
 (0)