Skip to content

Conversation

@SoonIter
Copy link
Member

Summary

feat(ssg-md): support Overview and HomeLayout

Related Issue

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 25, 2025 18:48
@netlify
Copy link

netlify bot commented Dec 25, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 30a0582
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/694d8718e0d5e70008323759
😎 Deploy Preview https://deploy-preview-2933--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

Rsdoctor Bundle Diff Analysis

Found 3 projects in monorepo, 2 projects with changes.

📊 Quick Summary
Project Total Size Change
node 9.3 MB 0
node_md 1.2 MB 📈 +23.8 KB (+2.0%)
web 15.1 MB -1.0 B (-0.0%)
📋 Detailed Reports (Click to expand)

📁 node_md

Path: website/doc_build/diff-rsdoctor/node_md/rsdoctor-data.json

📌 Baseline Commit: c03d863a6b | PR: #2927

Metric Current Baseline Change
📊 Total Size 1.2 MB 1.1 MB +23.8 KB (+2.0%)
📄 JavaScript 0 B 0 B 0
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 1.2 MB 1.1 MB +23.8 KB (+2.0%)

📦 Download Diff Report: node_md Bundle Diff

📁 web

Path: website/doc_build/diff-rsdoctor/web/rsdoctor-data.json

📌 Baseline Commit: c03d863a6b | PR: #2927

Metric Current Baseline Change
📊 Total Size 15.1 MB 15.1 MB -1.0 B (-0.0%)
📄 JavaScript 14.4 MB 14.4 MB -1.0 B (-0.0%)
🎨 CSS 115.4 KB 115.4 KB 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 526.5 KB 526.5 KB 0

📦 Download Diff Report: web Bundle Diff

Generated by Rsdoctor GitHub Action

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for rendering Overview and HomeLayout components in SSG (Static Site Generation) markdown mode by introducing markdown-formatted output when process.env.__SSR_MD__ is true.

Key Changes

  • Modified App.tsx to render Layout component instead of Content in SSR_MD mode
  • Added conditional markdown rendering for HomeLayout and Overview components
  • Reorganized hook call ordering in Layout component to accommodate SSR_MD checks

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
packages/core/src/runtime/App.tsx Updated SSR_MD mode to render full Layout with Root wrapper instead of just Content
packages/core/src/theme/layout/Layout/index.tsx Moved hook calls (useSetup, useScrollReset, useRedirect4FirstVisit) after SSR_MD conditional check
packages/core/src/theme/layout/HomeLayout/index.tsx Added HomeLayoutMarkdown function to generate markdown representation of hero and features sections
packages/core/src/theme/layout/DocLayout/index.tsx Added SSR_MD conditional to return simplified layout with Overview or DocContent
packages/core/src/theme/components/Overview/index.tsx Added OverviewMarkdown function to generate markdown representation of overview groups and items

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SoonIter SoonIter merged commit b5c8703 into main Dec 26, 2025
16 checks passed
@SoonIter SoonIter deleted the syt/support-ssg-md-home-layout-overview branch December 26, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants