> For AI agents: the complete documentation index is available at https://rspress.rs/llms.txt, the full documentation bundle is available at https://rspress.rs/llms-full.txt.

# 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 Architecture](https://assets.rspack.rs/rspress/assets/rspress-architecture.png)

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**](https://rspress.rs/plugin/system/plugin-api.md#markdown) by adding [`remark`](https://github.com/remarkjs/remark) or [`rehype`](https://github.com/rehypejs/rehype) plugins.
- [**Add custom pages**](https://rspress.rs/plugin/system/plugin-api.md#addpages) on top of Rspress's conventional routing, such as a `/blog` route that renders a custom blog list.
- [**Customize build tool behavior**](https://rspress.rs/plugin/system/plugin-api.md#builderconfig) by modifying the underlying [Rsbuild](https://rsbuild.rs) config or adding Rspack/Rsbuild plugins.
- [**Extend page metadata**](https://rspress.rs/plugin/system/plugin-api.md#extendpagedata). Rspress calculates metadata such as `title` and `description` for each page. Plugins can extend that logic, and theme code can read the result with [usePageData](https://rspress.rs/ui/hooks/use-page-data.md).
- Run [**custom logic**](https://rspress.rs/plugin/system/plugin-api.md#beforebuildafterbuild) before and after builds, such as closing event listeners after a build ends.
- [**Add global components**](https://rspress.rs/plugin/system/plugin-api.md#globaluicomponents). Since Rspress renders with React, plugins can add global React components such as a BackToTop component or global side-effect component.
