npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@callstack/rspress-preset

v0.4.5

Published

Callstack preset for Rspress docs

Readme

Callstack Rspress Preset

Installation

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

Usage

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
  })
);

Required/expected public assets

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).

  • Favicon: e.g. /icon.png (supports png|svg|ico)
  • Logo (light): e.g. /logo-light.png (supports png|svg|jpg|jpeg|webp|avif)
  • Logo (dark): e.g. /logo-dark.png (supports png|svg|jpg|jpeg|webp|avif)
  • Open Graph image: e.g. /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.

Options Reference

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):

    • title (string, required): Docs site title.
    • description (string, required): Site description.
    • editUrl (url string, required): Base repo URL used to build “Edit this page” links.
    • icon (string, optional): Filename from docs public directory for site icon.
    • logoLight (string, optional): Filename from docs public for light logo.
    • logoDark (string, optional): Filename from docs public for dark logo.
    • ogImage (string, optional): Filename from docs public for Open Graph image.
    • rootDir (string, optional): Directory containing markdown docs. Default: docs.
    • rootUrl (url string, required): Absolute site origin, e.g. https://docs.example.com.
    • socials (record, optional): Map of social icon name → URL. Keys must match Rspress theme 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.