docs(theme): refactor home page and component documentation#3015
docs(theme): refactor home page and component documentation#3015
Conversation
…了指向 `frontmatter` 配置页面的链接。
**修改的文件:**
1. `website/docs/zh/ui/components/home-hero.mdx` (中文)
* 删除了 YAML 配置示例。
* 删除了 "Hero 配置" 章节。
* 在 "用法" 中添加了指向 `/api/config/config-frontmatter#hero` 的链接。
2. `website/docs/en/ui/components/home-hero.mdx` (英文)
* 删除了 YAML 配置示例。
* 删除了 "Hero configuration" 章节。
* 在 "Usage" 中添加了指向 `/api/config/config-frontmatter#hero` 的链接。
3. `website/docs/zh/ui/components/home-feature.mdx` (中文)
* 修改了 "用法" 部分的描述,添加了指向 `/api/config/config-frontmatter#features` 的链接。
4. `website/docs/en/ui/components/home-feature.mdx` (英文)
* 删除了 YAML 配置示例。
* 修改了 "Usage" 部分的描述,添加了指向 `/api/config/config-frontmatter#features` 的链接。
所有文件已根据项目规范进行了格式化。
**修改文件:** * `website/docs/zh/guide/basic/home-page.mdx` (中文) * `website/docs/en/guide/basic/home-page.mdx` (英文) **修改内容:** 在首页文档末尾增加了 "Home 组件" (Home Components) 章节,列出了以下组件的链接: * HomeHero * HomeFeature * HomeFooter * HomeBackground 并在最后再次强调并提供了指向 "Frontmatter 配置" (Frontmatter Config) 的链接。
1. **Home Page 文档 (`home-page.mdx`):**
* 修改了 "Home 组件" 章节的描述为:"Rspress 首页由这些组件组成,你可以通过 eject 定制" (及对应的英文 "The Rspress Home page consists of these components, which you can customize via eject")。
* 增加了一个 Warning 提示框,说明可以通过覆盖 `HomeLayout` 来定制整个首页,但需要自行处理 frontmatter 的读取。
2. **Home Hero 文档 (`home-hero.mdx`):**
* 修改了组件读取配置的描述,明确指出是通过 `useFrontmatter` 读取的。
* 添加了指向 `useFrontmatter` 文档的链接。
所有文件(包括中文和英文版本)都已更新并格式化。
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This pull request refactors documentation for the HomeHero and HomeFeature components by removing duplicated frontmatter configuration details and replacing them with links to the centralized Frontmatter configuration page. This improves maintainability by having a single source of truth for configuration documentation.
Changes:
- Removed detailed frontmatter configuration examples and type definitions from HomeHero and HomeFeature component documentation
- Added concise descriptions with links to the centralized Frontmatter Config page for
heroandfeaturesconfigurations - Added new "Home components" section to the home-page guide documenting available components and their customization options
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/ui/components/home-hero.mdx | Replaced detailed hero configuration documentation with a brief description and link to centralized config |
| website/docs/zh/ui/components/home-feature.mdx | Updated to link to centralized features configuration documentation |
| website/docs/zh/guide/basic/home-page.mdx | Added Home components section and configuration reference |
| website/docs/en/ui/components/home-hero.mdx | English version of home-hero documentation updates |
| website/docs/en/ui/components/home-feature.mdx | English version of home-feature documentation updates |
| website/docs/en/guide/basic/home-page.mdx | English version of home-page documentation additions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rsdoctor Bundle Diff AnalysisFound 3 projects in monorepo, 3 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 nodePath:
📦 Download Diff Report: node Bundle Diff 📁 node_mdPath:
📦 Download Diff Report: node_md Bundle Diff 📁 webPath:
📦 Download Diff Report: web Bundle Diff Generated by Rsdoctor GitHub Action |
Summary
Refactored the documentation for the Home page and its components (
HomeHero,HomeFeature) to improve clarity and reduce duplication.HomeHero,HomeFeature,HomeFooter,HomeBackground) and explaining they can be customized via eject. Added a warning note about overridingHomeLayout.HomeHeroreads configuration viauseFrontmatter.Related Issue
N/A
Checklist
AI Summary
Refactored
HomeHero,HomeFeature, andHome Pagedocumentation to centralize configuration details and clarify customization options.HomeHeroandHomeFeaturedocs, linking to the main config page instead.Home Pagedocs to list available components and provide guidance on customization (eject vs. layout override).HomeHerousesuseFrontmatterfor configuration.This PR was written using Vibe Kanban