Home Features
Rspress provides a built-in HomeFeature component that allows you to easily create feature showcases on the homepage.
Basic Usage
Add a features array to the frontmatter of your homepage (index.md):
Configuration Options
Advanced Configuration
Grid Layout Control
Use the span property to control the width of each feature:
Adding Links
Use the link property to make features clickable:
Example
Here's a complete example of homepage features configuration:
Responsive Layout
Rspress automatically handles responsive layout:
- Desktop (> 960px): Display according to
spanproperty - Tablet (≤ 960px): Automatically adjust to 2 columns
- Mobile (≤ 640px): Automatically adjust to 1 column
No additional configuration is needed, the system will automatically adapt to different screen sizes.