Skip to content

Commit 559277f

Browse files
authored
chore: Review links (#1032)
* chore: remove databend.rs redirect * fix: format * chore: remove redirects
1 parent 79a5d0e commit 559277f

File tree

10 files changed

+256
-161
lines changed

10 files changed

+256
-161
lines changed

docusaurus.config.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,26 @@ const config: Config = {
202202
},
203203
},
204204
],
205+
[
206+
'@docusaurus/plugin-client-redirects',
207+
{
208+
redirects: [
209+
{ to: '/doc/sql-reference', from: '/sql/sql-reference' },
210+
{ to: '/doc/sql-functions', from: '/sql/sql-functions' },
211+
{ to: '/doc/sql-commands', from: '/sql/sql-commands' },
212+
{ to: '/doc/develop', from: '/developer/drivers' },
213+
{ to: '/doc/deploy', from: '/guides/deploy' },
214+
{ to: '/doc/cloud', from: '/guides/cloud' },
215+
{ to: '/cloud/develop', from: '/developer/drivers' },
216+
{ to: '/doc/sql-clients', from: '/guides/sql-clients' },
217+
{ to: '/doc/load-data', from: '/guides/load-data' },
218+
{ to: '/doc/visualize', from: '/guides/visualize' },
219+
{ to: '/doc/monitor', from: '/guides/monitor' },
220+
{ to: '/doc/overview', from: '/guides/overview' },
221+
{ to: '/cloud/getting-started/new-account', from: '/guides/cloud/new-account' },
222+
]
223+
}
224+
]
205225
],
206226
themes: ['@docusaurus/theme-mermaid'],
207227
markdown: {
@@ -324,3 +344,18 @@ const config: Config = {
324344
};
325345

326346
export default config;
347+
348+
349+
// "/doc/sql-reference": "/sql/sql-reference",
350+
// "/doc/sql-commands": "/sql/sql-commands",
351+
// "/doc/sql-functions": "/sql/sql-functions",
352+
// "/doc/develop": "/developer/drivers",
353+
// "/doc/deploy": "/guides/deploy",
354+
// "/doc/cloud": "/guides/cloud",
355+
// "/cloud/develop": "/developer/drivers",
356+
// "/doc/sql-clients": "/guides/sql-clients",
357+
// "/doc/load-data": "/guides/load-data",
358+
// "/doc/visualize": "/guides/visualize",
359+
// "/doc/monitor": "/guides/monitor",
360+
// "/doc/overview": "/guides/overview",
361+
// "/cloud/getting-started/new-account": "/guides/cloud/new-account",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"dependencies": {
2626
"@ant-design/icons": "^5.3.7",
2727
"@docusaurus/core": "3.4.0",
28+
"@docusaurus/plugin-client-redirects": "^3.4.0",
2829
"@docusaurus/preset-classic": "3.4.0",
2930
"@docusaurus/theme-mermaid": "^3.4.0",
3031
"@mdx-js/react": "^3.0.0",
Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,45 @@
11
// Copyright 2023 Datafuse Labs.
2-
import React from 'react'
3-
import { type FC, type ReactElement } from 'react'
4-
import styles from './styles.module.scss'
5-
import clsx from 'clsx'
6-
import { type ICommonProps } from '@site/src/types'
2+
import React from "react";
3+
import { type FC, type ReactElement } from "react";
4+
import styles from "./styles.module.scss";
5+
import clsx from "clsx";
6+
import { type ICommonProps } from "@site/src/types";
77
interface IProps extends ICommonProps {
8-
href?: string
9-
isDownload?: boolean
10-
padding?: number[]
11-
onClick?: () => void
8+
href?: string;
9+
isDownload?: boolean;
10+
padding?: number[];
11+
onClick?: () => void;
1212
}
13-
const Card: FC<IProps> = ({ children, padding, className, href, isDownload, style, onClick }): ReactElement => {
13+
const Card: FC<IProps> = ({
14+
children,
15+
padding,
16+
className,
17+
href,
18+
isDownload,
19+
style,
20+
onClick,
21+
}): ReactElement => {
1422
const p = padding || [28, 24];
1523
const props = {
1624
style: { padding: `${p[0]}px ${p[1]}px`, ...style },
17-
className: clsx(styles.wrap, className)
25+
className: clsx(styles.wrap, className),
1826
};
1927
return (
2028
<>
21-
{
22-
href
23-
? <a onClick={onClick} download={isDownload} href={href} {...props}>{children}</a>
24-
: <div onClick={onClick} {...props}>{children}</div>
25-
}
29+
{href ? (
30+
<a onClick={onClick} download={isDownload} href={href} {...props}>
31+
{children}
32+
</a>
33+
) : (
34+
<div onClick={onClick} {...props}>
35+
{children}
36+
</div>
37+
)}
2638
</>
27-
)
39+
);
2840
};
2941
Card.defaultProps = {
3042
padding: [28, 24],
31-
isDownload: false
43+
isDownload: false,
3244
};
33-
export default Card
45+
export default Card;

src/components/RedirectComponent/index.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)