Skip to content

Commit 883254f

Browse files
committed
docs: upgraded to newest callstack theme, migrated to preset
1 parent 2c780e4 commit 883254f

File tree

6 files changed

+471
-1248
lines changed

6 files changed

+471
-1248
lines changed

docs/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
"preview": "rspress preview"
1111
},
1212
"dependencies": {
13-
"@callstack/rspress-theme": "^0.3.1",
14-
"@rspress/plugin-typedoc": "2.0.0-beta.21",
15-
"rspress": "2.0.0-beta.21",
16-
"rspress-plugin-katex": "^0.3.0"
13+
"@rspress/plugin-typedoc": "2.0.0-beta.34",
14+
"@rspress/core": "2.0.0-beta.34",
15+
"@callstack/rspress-preset": "~0.4.3"
1716
},
1817
"devDependencies": {
1918
"@biomejs/biome": "^1.9.4",

docs/rspress.config.ts

Lines changed: 58 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,65 @@
11
import * as path from 'node:path';
2+
import url from 'node:url';
23

3-
import { pluginCallstackTheme } from '@callstack/rspress-theme/plugin';
4+
import { withCallstackPreset } from '@callstack/rspress-preset';
5+
import { defineConfig } from '@rspress/core';
46
import { pluginTypeDoc } from '@rspress/plugin-typedoc';
5-
import katex from 'rspress-plugin-katex';
6-
import { defineConfig } from 'rspress/config';
77

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',
2222
},
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',
2626
},
2727
},
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+
);

docs/theme/styles.css

Whitespace-only changes.

examples/rn-app/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,5 @@ This is one way to run the app — you can also build it directly from Android S
6767
The final step is to trace the application using one of the available backends. This step varies depending on the backend you would like to use.
6868

6969
The demonstrator application has all backends installed simultaneously, so you can record the trace from any backend of your choice. The correct way to do it is by following the steps of the backend, which is described in a given `README.md` file of the backends. You can find a list of available backends in the [root README](../../README.md) file.
70+
71+
If using the Jaeger backend from [the example](../backend-jaeger/), remember to `adb forward tcp:4318 tcp:4318` for Android devices/emulators.

packages/backend-platform/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ This plugin is the platform-specific backend implementation for RN Ottrelite Cor
2626

2727
## Supported features
2828

29-
| Feature | Support level (compile-time) |
30-
| --------------------------------------------- | --------------------------------------------- |
31-
| synchronous traces (`{begin,end}Event`) | Android: API level $\geqslant 23$ (Android M) |
32-
| asynchronous traces (`{begin,end}AsyncEvent`) | Android: API level $\geqslant 29$ (Android Q) |
33-
| counter events (`counterEvent`) | Android: API level $\geqslant 29$ (Android Q) |
29+
| Feature | Android support (compile-time) | iOS support (compile-time) |
30+
| --------------------------------------------- | ------------------------------ | -------------------------- |
31+
| synchronous traces (`{begin,end}Event`) | API level 23 (Android M) | iOS ≥ 15.0 |
32+
| asynchronous traces (`{begin,end}AsyncEvent`) | API level 29 (Android Q) | iOS ≥ 15.0 |
33+
| counter events (`counterEvent`) | API level 29 (Android Q) | iOS ≥ 15.0 |
3434

3535
> [!NOTE]
3636
> The support levels above mean that the application must be **compiled** with at least the given `minSdkVersion`. This is because those APIs are not available on older Android versions and therefore it is not possible to compile the native code against older SDKs.

0 commit comments

Comments
 (0)