
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@callstack/rspress-preset
Advanced tools
To install the @callstack/rspress-preset
package, use your package manager of choice.
npm install @callstack/rspress-preset
# or
yarn add @callstack/rspress-preset
# or
pnpm add @callstack/rspress-preset
# or
bun add @callstack/rspress-preset
Use the preset helper withCallstackPreset
to generate a complete Rspress config from a small set of options, and then merge it with your own overrides if needed.
The preset wires up the Callstack theme, sensible defaults, sitemap and open-graph plugins, search, clean URLs, and common theme config.
Update your rspress.config.ts
:
import { defineConfig } from '@rspress/core';
import { withCallstackPreset } from '@callstack/rspress-preset';
export default withCallstackPreset(
{
context: __dirname,
docs: {
title: 'My Project',
description: 'Awesome docs powered by Rspress',
editUrl: 'https://github.com/org/repo/edit/main',
rootUrl: 'https://docs.example.com',
icon: 'icon.ico',
logoLight: 'logo-light.png',
logoDark: 'logo-dark.png',
ogImage: 'og-image.png',
// Optional: defaults to 'docs'
rootDir: 'docs',
// Optional: social links; keys follow Rspress theme icons
socials: {
github: 'https://github.com/org/repo',
x: 'https://x.com/my_profile',
},
},
// Optional: forwarded to @callstack/rspress-theme/plugin
theme: {
// theme settings
},
// Optional: boolean or config for Vercel Analytics.
vercelAnalytics: true,
},
defineConfig({
// Your extra/override Rspress config if needed
})
);
All graphical assets are optional but recommended. Place files in <docs.rootDir>/public/
(default docs/public/
), and set their filenames via theme options (docs.icon
, docs.logoLight
, docs.logoDark
, docs.ogImage
).
/icon.png
(supports png|svg|ico
)/logo-light.png
(supports png|svg|jpg|jpeg|webp|avif
)/logo-dark.png
(supports png|svg|jpg|jpeg|webp|avif
)/og-image.png
(supports png|svg|jpg|jpeg|webp|avif
)If only one of logoLight
or logoDark
is provided, it will be used for both modes.
withCallstackPreset(options, userConfig)
options (object, required): Preset options.
options.context (string, required): Absolute path to your project root (e.g. __dirname
).
options.docs (object, required):
docs
.https://docs.example.com
.socialLinks
icons (e.g. github
, x
, discord
, …).options.theme (object, optional): Passed through to @callstack/rspress-theme/plugin
. See that package for available settings.
options.vercelAnalytics (boolean | object, optional): Enable/disable Vercel Analytics or pass its config. If omitted, it auto-enables when a vercel.json
exists at the project root.
userConfig (Rspress UserConfig
, optional): Your additional config merged after the preset config via mergeDocConfig
.
FAQs
Callstack preset for Rspress docs
We found that @callstack/rspress-preset demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.