Conversation
✅ 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 PR improves the Layout component documentation by adding missing slot documentation and better organization. The changes ensure that all Layout component slots are properly documented with consistent formatting across both Chinese and English versions.
- Added missing
beforeNavMenuandafterNavslot documentation - Added "Layout 插槽" / "Layout Slots" section heading for better organization
- Updated
afterNavMenucomment for clarity
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| website/docs/zh/guide/basic/custom-theme.mdx | Added Layout Slots heading, documented missing beforeNavMenu and afterNav slots, and updated comments in Chinese |
| website/docs/en/guide/basic/custom-theme.mdx | Added Layout Slots heading, documented missing beforeNavMenu and afterNav slots, and updated comments in English |
💡 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 |
## 修改完成 对中文和英文文档都进行了以下修改: 1. **添加了 "Layout 插槽" 小标题**(英文为 "Layout Slots")- 在 `## Wrap` 部分下面的插槽说明前添加了 `### Layout 插槽` 三级标题 2. **补充了遗漏的插槽文档**: - `beforeNavMenu` - 导航栏菜单之前 - `afterNav` - 导航栏之后 经过与 Layout 组件源码(`packages/core/src/theme/layout/Layout/index.tsx`)对比,现在文档中所有的 Layout 插槽都已完整: | 插槽 | 说明 | |------|------| | `top` | 整个页面最顶部 | | `bottom` | 整个页面最底部 | | `beforeHero` | Home 页 Hero 部分之前 | | `afterHero` | Home 页 Hero 部分之后 | | `beforeFeatures` | Home 页 Features 部分之前 | | `afterFeatures` | Home 页 Features 部分之后 | | `beforeDocFooter` | 正文页 Footer 部分之前 | | `afterDocFooter` | 正文页 Footer 部分之后 | | `beforeDoc` | 正文页最前面 | | `afterDoc` | 正文页最后面 | | `beforeDocContent` | 文档内容前面 | | `afterDocContent` | 文档内容后面 | | `beforeNav` | 导航栏之前 | | `afterNav` | 导航栏之后 ✅ 新增 | | `beforeNavTitle` | 左上角导航栏标题之前 | | `navTitle` | 导航栏标题 | | `afterNavTitle` | 左上角导航栏标题之后 | | `beforeNavMenu` | 导航栏菜单之前 ✅ 新增 | | `afterNavMenu` | 导航栏菜单之后 | | `beforeSidebar` | 左侧侧边栏上面 | | `afterSidebar` | 左侧侧边栏下面 | | `beforeOutline` | 右侧大纲栏上面 | | `afterOutline` | 右侧大纲栏下面 | | `components` | 自定义 MDX 组件 |
2667cbb to
64991b0
Compare
Summary
This PR improves the custom theme documentation by:
beforeNavMenuandafterNavslot documentation to the Layout component propsChanges Made
Missing Slots Added
beforeNavMenu- Content rendered before the nav bar menuafterNav- Content rendered after the nav barThese slots were available in the Layout component (
packages/core/src/theme/layout/Layout/index.tsx) but were not documented.Documentation Structure
### Layout Slots(English) /### Layout 插槽(Chinese) heading to clearly identify the slot props sectionafterNavMenuto be more descriptive ("After nav bar menu" instead of "Upper right corner of nav bar")Why
The documentation was incomplete - users looking to customize their theme layout could not discover the
beforeNavMenuandafterNavslots without reading the source code. This PR ensures all Layout slots are properly documented.This PR was written using Vibe Kanban