Introduction
The plugin system is a core part of Rspress. It lets you extend Rspress during the site build process. First, let's look at the overall Rspress architecture.
The overall architecture of Rspress is shown in the figure below:

Rspress has two main parts: Node Side and Browser Runtime. The plugin system lets you extend both parts. Specifically, plugins can:
- Extend Markdown/MDX compilation by adding
remarkorrehypeplugins. - Add custom pages on top of Rspress's conventional routing, such as a
/blogroute that renders a custom blog list. - Customize build tool behavior by modifying the underlying Rsbuild config or adding Rspack/Rsbuild plugins.
- Extend page metadata. Rspress calculates metadata such as
titleanddescriptionfor each page. Plugins can extend that logic, and theme code can read the result with usePageData. - Run custom logic before and after builds, such as closing event listeners after a build ends.
- Add global components. Since Rspress renders with React, plugins can add global React components such as a BackToTop component or global side-effect component.