- Monorepo via
pnpm+Nx. - Packages:
packages/core(CLI +@rspress/core),packages/theme-default(Default theme),packages/plugin-*(Official plugins),packages/create-rspress(scaffolder). - Tests:
packages/*/tests(unit) ande2e/(end-to-end tests); website examples inwebsite/. - Key config:
nx.json,biome.json,.prettierrc,playwright.config.ts,pnpm-workspace.yaml.
- Install:
pnpm install(Node >= 18.0, pnpm >= 10.15). - Build:
pnpm build(all) andpnpm build:website. - Watch dev:
pnpm dev(all packages) orpnpm dev:website(documentation site). - Lint/format:
pnpm lint; auto-fix:pnpm format. - Tests:
pnpm test; targeted:pnpm test:unitorpnpm test:e2e; update snapshots:pnpm testu.
- TypeScript + ESM; spaces; single quotes.
- Biome is canonical linter/formatter; Prettier formats MD/CSS/JSON and
package.json. - Filenames:
camelCaseorPascalCase(Biome enforced).
- Unit:
rstest; E2E:@playwright/test. - Naming:
*.test.ts/*.test.tsx; snapshots in__snapshots__/. - Placement: unit under
packages/*/tests; e2e undere2e/.
- Conventional Commits (e.g.,
feat(plugin-algolia): ...); keep commits focused; run lint + tests. - User-facing changes need a Changeset (
pnpm changeset); PRs should include description, linked issues, and doc/example updates when needed.
PR titles must follow Conventional Commits format: type(scope): description
- type:
feat,fix,docs,chore,refactor,test,perf, etc. - scope: Package name or functional module for easy navigation and filtering. Examples:
ssg-md- SSG-MD related featurestheme- General theme changestheme/Nav,theme/Sidebar,theme/CodeBlockRuntime- Specific theme componentscore- Core functionalitydeps- Dependency updatese2e- E2E testsplugin-algolia,plugin-llms, etc. - Specific plugins
- description: Clear, concise description of the change
Examples:
feat(ssg-md): support Overview and HomeLayoutfix(theme/Nav): render empty nav items correctlydocs: upgrade llms.txt and ssg-mdchore(deps): update dependency react-router-dom to ^7.11.0
packages/core(@rspress/core): CLIrspress build/dev(add--watch), config viarspress.config.tsusingdefineConfig; programmaticimport { defineConfig, loadConfig } from '@rspress/core'.packages/core/theme(@rspress/core/theme): Default theme with components and layouts.packages/plugin-*(@rspress/plugin-*): Official plugins likeplugin-algolia(search),plugin-llms(LLM optimization),plugin-typedoc(API docs), etc.packages/create-rspress(create-rspress): scaffold new projects/templates withpnpm dlx create-rspress(ornpx create-rspress).
- Heading case: Run
npx heading-case --writeto format markdown/mdx heading case before committing documentation changes.
- Do not commit build artifacts (
dist/,compiled/). - Nx caching is enabled; scripts use
NX_DAEMON=falsefor reproducible CI.