docs(guide): rewrite SSG documentation with comprehensive explanations#2985
docs(guide): rewrite SSG documentation with comprehensive explanations#2985
Conversation
**修改的文件:** - `website/docs/zh/guide/basic/ssg.mdx` - 中文版 - `website/docs/en/guide/basic/ssg.mdx` - 英文版 **新文档结构:** 1. **什么是 SSG** - 概念介绍和优势 2. **Dev 与 Build 的对比** - 表格对比 + 命令说明 + 预览/部署方式 3. **SSG 与 CSR 产物的对比** - 产物目录结构 - HTML 内容差异(核心区别) - 加载流程差异 4. **常见问题与解决方案** - `window is not defined` / `document is not defined`(含 3 种解决方案和代码示例) - Hydration Mismatch(含代码示例) 5. **配置选项** - `ssg: true/false` 6. **自定义 HTML 内容** - `builderConfig.html.tags` 新文档比原文档更加深入,帮助用户理解: - SSG 框架的工作原理 - 为什么 Dev 模式正常但 Build 报错 - 如何正确解决构建问题
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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 |
There was a problem hiding this comment.
Pull request overview
This PR comprehensively rewrites the SSG (Static Site Generation) documentation for both Chinese and English versions. The documentation was previously too shallow and could lead to build/deployment errors without clear guidance on how to resolve them.
Key changes:
- Added detailed explanations of SSG concepts, advantages, and how it differs from CSR
- Included clear comparisons of dev mode (CSR) vs build mode (SSG/CSR) with tables
- Added troubleshooting sections for common issues (
window is not defined, hydration mismatches) with code examples - Restructured content flow: What is SSG → Dev/Build modes → Output comparison → Common issues → Configuration
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| website/docs/zh/guide/basic/ssg.mdx | Complete rewrite of Chinese SSG documentation with comprehensive explanations, examples, and troubleshooting guidance |
| website/docs/en/guide/basic/ssg.mdx | Complete rewrite of English SSG documentation maintaining consistency with Chinese version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
**中文版修改:** 1. "易于部署"部分添加了"无需部署服务器" 2. 标题改为"Dev 和 Build 下的区别",并添加说明 3. Build 模式部分添加了预渲染原理说明 **英文版修改:** 1. "Easy to Deploy"部分添加了"with no server required" 2. 标题改为"Differences Between Dev and Build",并添加说明 3. Build 模式部分添加了预渲染原理说明
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: SoonIter <79413249+SoonIter@users.noreply.github.com>
Summary
Related Issue
Checklist
AI Summary
What Changed
Completely rewrote the SSG (Static Site Generation) documentation for both English and Chinese versions (
website/docs/en/guide/basic/ssg.mdxandwebsite/docs/zh/guide/basic/ssg.mdx).Why
The original documentation was too shallow and didn't explain:
Users were encountering build/deployment errors without understanding the root cause.
New Documentation Structure
window is not defined,document is not defined, and Hydration Mismatch with code examplesbuilderConfig.html.tagsKey Improvements
This PR was written using Vibe Kanban