|
1 | 1 | import * as path from 'node:path'; |
| 2 | +import url from 'node:url'; |
2 | 3 |
|
3 | | -import { pluginCallstackTheme } from '@callstack/rspress-theme/plugin'; |
| 4 | +import { withCallstackPreset } from '@callstack/rspress-preset'; |
| 5 | +import { defineConfig } from '@rspress/core'; |
4 | 6 | import { pluginTypeDoc } from '@rspress/plugin-typedoc'; |
5 | | -import katex from 'rspress-plugin-katex'; |
6 | | -import { defineConfig } from 'rspress/config'; |
7 | 7 |
|
8 | | -export default defineConfig({ |
9 | | - root: path.join(__dirname, 'docs'), |
10 | | - title: 'React Native Ottrelite', |
11 | | - description: 'React Native Ottrelite Documentation', |
12 | | - logoText: 'React Native Ottrelite', |
13 | | - icon: '/img/favicon.svg', |
14 | | - logoDark: '/img/logo-dark.png', |
15 | | - logoLight: '/img/logo-light.png', |
16 | | - themeConfig: { |
17 | | - socialLinks: [ |
18 | | - { |
19 | | - icon: 'github', |
20 | | - mode: 'link', |
21 | | - content: 'https://github.com/callstackincubator/ottrelite', |
| 8 | +const __filename = url.fileURLToPath(import.meta.url); |
| 9 | +const __dirname = path.dirname(__filename); |
| 10 | + |
| 11 | +export default withCallstackPreset( |
| 12 | + { |
| 13 | + context: __dirname, |
| 14 | + docs: { |
| 15 | + title: 'React Native Ottrelite', |
| 16 | + description: 'React Native Ottrelite Documentation', |
| 17 | + icon: '/img/favicon.svg', |
| 18 | + logoDark: '/img/logo-dark.png', |
| 19 | + logoLight: '/img/logo-light.png', |
| 20 | + socials: { |
| 21 | + github: 'https://github.com/callstackincubator/ottrelite', |
22 | 22 | }, |
23 | | - ], |
24 | | - footer: { |
25 | | - message: `Copyright © ${new Date().getFullYear()} Callstack Open Source`, |
| 23 | + editUrl: 'https://github.com/callstackincubator/ottrelite/edit/main/docs', |
| 24 | + rootUrl: 'https://oss.callstack.com/ottrelite/', |
| 25 | + rootDir: 'docs', |
26 | 26 | }, |
27 | 27 | }, |
28 | | - markdown: { |
29 | | - checkDeadLinks: true, |
30 | | - }, |
31 | | - base: '/ottrelite/', |
32 | | - plugins: [ |
33 | | - pluginCallstackTheme(), |
34 | | - pluginTypeDoc({ |
35 | | - entryPoints: [ |
36 | | - path.join(__dirname, '..', 'packages', 'core', 'src', 'index.ts'), |
37 | | - path.join( |
38 | | - __dirname, |
39 | | - '..', |
40 | | - 'packages', |
41 | | - 'backend-wrapper-tracy', |
42 | | - 'src', |
43 | | - 'index.ts', |
44 | | - ), |
45 | | - path.join( |
46 | | - __dirname, |
47 | | - '..', |
48 | | - 'packages', |
49 | | - 'backend-platform', |
50 | | - 'src', |
51 | | - 'index.ts', |
52 | | - ), |
53 | | - path.join( |
54 | | - __dirname, |
55 | | - '..', |
56 | | - 'packages', |
57 | | - 'interop-otel', |
58 | | - 'src', |
59 | | - 'index.ts', |
60 | | - ), |
61 | | - ], |
62 | | - outDir: 'api', |
63 | | - }), |
64 | | - // @ts-ignore-next-line -- katex has invalid typings |
65 | | - katex(), |
66 | | - ], |
67 | | -}); |
| 28 | + defineConfig({ |
| 29 | + base: '/ottrelite/', |
| 30 | + outDir: 'build', |
| 31 | + plugins: [ |
| 32 | + // @ts-ignore-next-line -- typedoc plugin has invalid typings |
| 33 | + pluginTypeDoc({ |
| 34 | + entryPoints: [ |
| 35 | + path.join(__dirname, '..', 'packages', 'core', 'src', 'index.ts'), |
| 36 | + path.join( |
| 37 | + __dirname, |
| 38 | + '..', |
| 39 | + 'packages', |
| 40 | + 'backend-wrapper-tracy', |
| 41 | + 'src', |
| 42 | + 'index.ts' |
| 43 | + ), |
| 44 | + path.join( |
| 45 | + __dirname, |
| 46 | + '..', |
| 47 | + 'packages', |
| 48 | + 'backend-platform', |
| 49 | + 'src', |
| 50 | + 'index.ts' |
| 51 | + ), |
| 52 | + path.join( |
| 53 | + __dirname, |
| 54 | + '..', |
| 55 | + 'packages', |
| 56 | + 'interop-otel', |
| 57 | + 'src', |
| 58 | + 'index.ts' |
| 59 | + ), |
| 60 | + ], |
| 61 | + outDir: 'api', |
| 62 | + }), |
| 63 | + ], |
| 64 | + }) |
| 65 | +); |
0 commit comments