Skip to content

Commit b6a6cf7

Browse files
committed
chore: upgrade to rspress-preset & newest rspress beta
1 parent 837b6b3 commit b6a6cf7

File tree

4 files changed

+408
-388
lines changed

4 files changed

+408
-388
lines changed

docs/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
1111
"preview": "rspress preview"
1212
},
1313
"dependencies": {
14-
"@callstack/rspress-theme": "^0.2.0",
15-
"rspress": "^2.0.0-beta.21"
14+
"@callstack/rspress-preset": "^0.4.1",
15+
"@rspress/core": "2.0.0-beta.32"
1616
},
1717
"devDependencies": {
18-
"@types/node": "^20",
19-
"rsbuild-plugin-open-graph": "^1.0.2"
18+
"@types/node": "^20"
2019
}
2120
}

docs/rspress.config.ts

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,25 @@
1-
import * as path from 'path';
2-
import { defineConfig } from 'rspress/config';
3-
import { pluginOpenGraph } from 'rsbuild-plugin-open-graph';
4-
import { pluginCallstackTheme } from '@callstack/rspress-theme/plugin';
1+
import { withCallstackPreset } from '@callstack/rspress-preset';
52

6-
export default defineConfig({
7-
root: path.join(__dirname, 'docs'),
8-
base: '/react-native-bottom-tabs/',
9-
title: 'React Native Bottom Tabs',
10-
description: 'React Native Bottom Tabs Documentation',
11-
logoText: 'React Native Bottom Tabs',
12-
icon: '/img/phone.png',
13-
logo: '/img/phone.png',
14-
globalStyles: path.join(__dirname, 'theme/styles.css'),
15-
themeConfig: {
16-
enableContentAnimation: true,
17-
enableAppearanceAnimation: false,
18-
socialLinks: [
19-
{
20-
icon: 'github',
21-
mode: 'link',
22-
content:
3+
export default withCallstackPreset(
4+
{
5+
context: __dirname,
6+
docs: {
7+
title: 'React Native Bottom Tabs',
8+
description: 'React Native Bottom Tabs Documentation',
9+
editUrl:
10+
'https://github.com/callstackincubator/react-native-bottom-tabs/tree/main/docs',
11+
icon: '/img/phone.png',
12+
logoLight: '/img/phone.png',
13+
logoDark: '/img/phone.png',
14+
rootDir: 'docs',
15+
rootUrl: 'https://callstackincubator.github.io/react-native-bottom-tabs/',
16+
socials: {
17+
github:
2318
'https://github.com/callstackincubator/react-native-bottom-tabs',
2419
},
25-
],
20+
},
2621
},
27-
plugins: [pluginCallstackTheme()],
28-
builderConfig: {
29-
plugins: [
30-
pluginOpenGraph({
31-
title: 'React Native Bottom Tabs',
32-
type: 'website',
33-
url: 'https://callstackincubator.github.io/react-native-bottom-tabs/',
34-
description: 'Native Bottom Tabs for React Native',
35-
}),
36-
],
37-
},
38-
});
22+
{
23+
base: '/react-native-bottom-tabs/',
24+
}
25+
);

docs/theme/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
import {
1414
HomeLayout as RspressHomeLayout,
1515
Layout as RspressLayout,
16-
} from 'rspress/theme';
16+
} from '@rspress/core/theme';
1717

1818
// You can customize the default Layout and HomeLayout like this:
1919
const Layout = () => (
@@ -44,4 +44,4 @@ export {
4444
};
4545

4646
// Export the default theme components
47-
export * from 'rspress/theme';
47+
export * from '@rspress/core/theme';

0 commit comments

Comments
 (0)