Overview of Rspress static site generator
@rspress/mdx-rs), which significantly reduces startup and build times compared to traditional JavaScript-based tools.website·Indexed 34 days ago
https://v1.rspress.rs/Documentation for Rspress, a static site generator featuring MDX support, a default theme with multi-versioning, and a variety of official plugins such as @rspress/plugin-typedoc, @rspress/plugin-shiki, and @rspress/plugin-api-docgen. This version 1.0 documentation covers configuration, client APIs, build commands, and deployment guides.
@rspress/mdx-rs), which significantly reduces startup and build times compared to traditional JavaScript-based tools.The Rspress plugin system allows developers to extend the framework's functionality across the Node side (build time) and the Browser Runtime. Key extension points include:
remark or rehype plugins to modify how Markdown/MDX is processed./blog page) beyond the framework's conventional routing.title and description), which can then be accessed via the usePageData hook.doc_build). This results in faster First Contentful Paint (FCP) and improved SEO as search engine spiders can crawl complete HTML content. In development environments, Rspress uses traditional SPA rendering instead of pre-rendering.Rspress and VitePress differ in their core frameworks and build toolchains:
overviewHeaders (an array of numbers) to specify which heading levels should be shown in the overview page. The default is [2] (h2).---
overviewHeaders: [2, 3]
---To create a nested overview page for a specific sub-directory (e.g., a theme directory), you can use one of two methods:
theme.md) and set overview: true in its frontmatter.index.md file inside the sub-directory, set overview: true in its frontmatter, and ensure the sub-directory's _meta.json includes that index file.# Method 1: Parent directory file
├── docs
│ ├── api
│ │ ├── index.md
│ │ ├── theme.md <-- (overview: true)
│ │ ├── theme
│ │ │ ├── component.mdx
│ │ └── ...
# Method 2: Internal index file
├── docs
│ ├── api
│ │ ├── theme
│ │ │ ├── index.md <-- (overview: true)
│ │ │ ├── component.mdx
│ │ └── ..._meta.json configuration and the H1/H2 headers of the linked articles. To enable this, you must set overview: true in the markdown file's frontmatter. You can optionally set a title in the frontmatter to override the default 'Overview' title, removing the need for an H1 header in the markdown body.---
overview: true
title: API Overview
---
This is an Overview page of our website._meta.json files in the directory structure. It creates groups based on directories and lists articles within those groups. To control which header levels are displayed in the overview, use the overviewHeaders configuration in _meta.json or the file's frontmatter (defaults to [2]).// api/_meta.json
[
{
"type": "file",
"name": "index",
"label": "API Overview"
},
{
"type": "dir",
"name": "theme",
"label": "Theme"
}
]// api/theme/_meta.json ["component", "utils"]
@rspress/plugin-container-syntax plugin is a built-in Rspress plugin that parses container syntax in Markdown and MDX files and compiles them into JSX syntax. It supports common container patterns such as :::tip, :::warning, and > [!NOTE], while automatically applying the necessary styles to these blocks.overview configuration allows you to customize the text used in the filter component of the overview page.import { defineConfig } from 'rspress/config';
export default defineConfig({
themeConfig: {
overview: {
filterNameText: 'Filter',
filterPlaceholderText: 'Enter keyword',
filterNoResultText: 'No matching API found',
},
},
});