Rspress Documentation

website·Indexed 34 days ago

https://rspress.rs

A component-based technical documentation generator that combines Markdown and JSX syntax via MDX. Features include internationalization (i18n), multi-version documentation support, custom theme development using React, and advanced code block highlighting powered by Shiki.

Tokens
52.6K
Snippets
321
Records
413
Agent score
21%

What's inside Rspress

  1. Overview of Rspress page customization methods

    Rspress provides three primary ways to customize the content and appearance of pages:

    1. Adding custom global components.
    2. Adding custom global styles.
    3. Customizing the page layout structure.
  2. Overview of Rspress

    Rspress is a lightning-fast static site generator designed for both human developers and AI agents. It aims to provide an integrated development experience for frontend and component library projects through ecosystem integration with Rslib and Rstest, and explores AI-driven documentation features like intelligent Q&A and automatic summarization.
  3. Overview of @rspress/plugin-twoslash

    @rspress/plugin-twoslash integrates the Twoslash library into Rspress. This allows developers to generate rich TypeScript code blocks that display real-time type information directly within the documentation.
  4. Overview of Rspress 2.0 features

    Rspress 2.0 introduces several enhancements to the documentation development experience beyond compilation performance:

    • AI-Native Capabilities: Built-in support for llms.txt generation and SSG-MD (Static Site Generation for Markdown), which produces high-quality Markdown optimized for AI Agents.
    • Instant Startup: lazyCompilation is enabled by default. Combined with resource prefetching on link hover, the system only builds required files for the visited route, ensuring fast startup regardless of project size.
    • Build-time Syntax Highlighting: Shiki is integrated by default for build-time highlighting, supporting theme switching and transformer extensions (e.g., @rspress/plugin-twoslash).
    • Theme Customization: A new default theme is provided with stable APIs for custom theme implementation.
    • Developer Experience (DX):
      • Optimized HMR for _nav.json and _meta.json.
      • JSON schema support for IDE code hints.
      • Default dead link checking.
      • New syntax for referencing external files in code blocks.
      • Simultaneous support for @rspress/plugin-preview and @rspress/plugin-playground.
    • Rslib Integration: Rspress can be selected as the documentation tool during create-rslib project initialization for component libraries.
  5. Overview of Rspress core features

    Rspress is a front-end toolchain designed for high-performance documentation sites. Key capabilities include:

    • Blazing fast build speed: Powered by Rust for an optimized development experience.
    • MDX Support: Allows the integration of React components directly within Markdown files.
    • Built-in Full-Text Search: Automatically generates a search index during the build process for out-of-the-box search functionality.
    • AI-Friendly Indexing: Uses SSG-MD to generate llms.txt-compliant indexes and Markdown files to improve LLM understanding of documentation.
    • Static Site Generation (SSG): Produces static HTML files for flexible production deployment.
    • Flexible Customization: Provides extension APIs to customize both the theme UI and the build process.
  6. Overview of Rspress Plugin System

    The Rspress plugin system allows developers to extend both the Node-side build process and the Browser runtime. Plugins can be used to:

    • Extend Markdown/MDX compilation via remark or rehype plugins.
    • Add custom pages and routing (e.g., a /blog route).
    • Customize build tool behavior by modifying Rsbuild or Rspack configurations.
    • Extend page metadata (like title and description).
    • Execute custom logic before and after builds.
    • Add global React components to the theme.
  7. Use React components in documentation with MDX

    Rspress supports MDX, allowing developers to use React components directly within Markdown files. This enables the creation of interactive, component-based technical documentation by combining Markdown syntax with JSX.
  8. Generate llms.txt files using @rspress/plugin-llms

    @rspress/plugin-llms is an official Rspress plugin used to generate llms.txt related files. These files provide a structured way for large language models (LLMs) to better understand and ingest your documentation site's content.
  9. Use the Badge component for inline labels

    The Badge component in RsPress is used to display small inline badges, typically used for labels, tags, or status indicators within documentation text.