Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/long-rockets-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rock-docs': patch
---

Use `@callstack/rspress-preset` & upgrade `@rspress/core` to 2.0.0-beta.32 &
1,449 changes: 257 additions & 1,192 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@
"preview": "rspress preview"
},
"dependencies": {
"@callstack/rspress-theme": "^0.3.1",
"@rspress/plugin-llms": "2.0.0-beta.21",
"rsbuild-plugin-open-graph": "^1.0.2",
"rspress": "2.0.0-beta.21",
"rspress-plugin-sitemap": "^1.1.2",
"rspress-plugin-vercel-analytics": "^0.3.0"
"@rspress/core": "2.0.0-beta.32",
"@callstack/rspress-preset": "~0.4.1"
},
"devDependencies": {
"@types/node": "^18.11.17",
Expand Down
83 changes: 29 additions & 54 deletions website/rspress.config.ts
Original file line number Diff line number Diff line change
@@ -1,57 +1,32 @@
import * as path from 'node:path';
import { pluginCallstackTheme } from '@callstack/rspress-theme/plugin';
import { pluginLlms } from '@rspress/plugin-llms';
import { pluginOpenGraph } from 'rsbuild-plugin-open-graph';
import { defineConfig } from 'rspress/config';
import pluginSitemap from 'rspress-plugin-sitemap';
import vercelPluginAnalytics from 'rspress-plugin-vercel-analytics';
import path from 'node:path';
import url from 'node:url';
import { withCallstackPreset } from '@callstack/rspress-preset';
import { defineConfig, type RspressPlugin } from '@rspress/core';

export default defineConfig({
root: path.join(__dirname, 'src'),
title: 'Rock',
icon: '/logo.svg',
outDir: 'build',
route: {
cleanUrls: true,
},
logo: {
light: '/logo-light.svg',
dark: '/logo-dark.svg',
},
builderConfig: {
plugins: [
pluginOpenGraph({
title: 'Rock',
type: 'website',
url: 'https://rockjs.dev',
image: 'https://rockjs.dev/og-image.jpg',
description:
'Easy to adopt. Simple to scale. Built for flexibility from day one',
twitter: {
site: '@rockjs_dev',
card: 'summary_large_image',
},
}),
],
},
themeConfig: {
socialLinks: [
{
icon: 'github',
mode: 'link',
content: 'https://github.com/callstack/rock',
const __filename = url.fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default withCallstackPreset(
{
context: __dirname,
docs: {
title: 'Rock',
description:
'Easy to adopt. Simple to scale. Built for flexibility from day one',
editUrl: 'https://github.com/callstack/rock/edit/main/website/src',
icon: '/logo.svg',
logoLight: '/logo-light.svg',
logoDark: '/logo-dark.svg',
ogImage: '/og-image.jpg',
rootDir: 'src',
rootUrl: 'https://rockjs.dev',
socials: {
github: 'https://github.com/callstack/rock',
x: 'https://x.com/rockjs_dev',
},
],
},
},
globalStyles: path.join(__dirname, 'theme/styles.css'),
plugins: [
pluginCallstackTheme(),
// @ts-expect-error outdated @rspress/shared declared as dependency
vercelPluginAnalytics(),
pluginLlms({
exclude: ({ page }) => page.routePath.includes('404'),
}),
// @ts-expect-error outdated @rspress/shared declared as dependency
pluginSitemap({ domain: 'https://rockjs.dev' }),
],
});
defineConfig({
outDir: 'build',
}),
);
2 changes: 1 addition & 1 deletion website/src/docs/brownfield/android.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PackageManagerTabs } from 'rspress/theme';
import { PackageManagerTabs } from '@theme';

# Integrating with Android Apps

Expand Down
2 changes: 1 addition & 1 deletion website/src/docs/brownfield/ios.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PackageManagerTabs } from 'rspress/theme';
import { PackageManagerTabs } from '@theme';

# Integrating with iOS Apps

Expand Down
2 changes: 1 addition & 1 deletion website/src/docs/getting-started/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PackageManagerTabs } from 'rspress/theme';
import { PackageManagerTabs } from '@theme';

# Quick start

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PackageManagerTabs } from 'rspress/theme';
import { PackageManagerTabs } from '@theme';

# Migrating from Community CLI

Expand Down Expand Up @@ -172,4 +172,4 @@ If you prefer to do it manually or encounter any issues, follow the steps below.
github-token: ${{ secrets.GITHUB_TOKEN }}
```

For more setup options see [GitHub Actions configuration](../remote-cache/github-actions/configuration.md)
For more setup options see [GitHub Actions configuration](../github-actions/configuration.md)
Loading