close
  • English
  • Home page

    Rspress provides an out-of-the-box Home page feature. Users can declare pageType: home in frontmatter to quickly generate a usable site homepage.

    You can define the content of the Home page through frontmatter, see FrontMatter Config for detailed types. Here is a simple example:

    docs/index.mdx
    ---
    pageType: home
    title: Rspress
    titleSuffix: 'Rsbuild-based Static Site Generator'
    
    hero:
      name: Rspress
      text: A documentation solution
      tagline: A modern documentation development technology stack
      actions:
        - theme: brand
          text: Introduction
          link: /en/guide/introduction
        - theme: alt
          text: Quick Start
          link: /en/guide/getting-started
    
    features:
      - title: 'MDX Support'
        details: MDX is a powerful way to write content. You can use React components in Markdown.
        icon: 📦
      - title: 'Feature Rich'
        details: Out of box support for i18n, full-text search etc.
        icon: 🎨
      - title: 'Customizable'
        details: You can customize the theme ui and the build process.
        icon: 🚀
    ---

    Home components

    The Rspress Home page consists of these components, which you can customize via Custom Theme - ESM Re-export:

    Tip

    You can also customize the entire homepage directly by overriding the HomeLayout component. If you do this, it should be noted that the homepage related configuration and these frontmatter fields will not take effect.

    Configuration details

    For complete frontmatter configuration options for the Home page, please refer to Frontmatter Config.