Skip to content

docs: add preview for some codeblocks#2907

Merged
SoonIter merged 1 commit intomainfrom
syt/add-tag
Dec 18, 2025
Merged

docs: add preview for some codeblocks#2907
SoonIter merged 1 commit intomainfrom
syt/add-tag

Conversation

@SoonIter
Copy link
Copy Markdown
Member

Summary

docs: add preview codeblock

Related Issue

Checklist

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

Copilot AI review requested due to automatic review settings December 18, 2025 10:40
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 18, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 7587652
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/6943da3d8536310008552c34
😎 Deploy Preview https://deploy-preview-2907--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.

@SoonIter SoonIter changed the title docs: add preview codeblock docs: add preview for some codeblocks Dec 18, 2025
Copy link
Copy Markdown
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 enhances component documentation by adding preview codeblocks that allow users to see live examples of the components directly in the documentation.

  • Adds preview attribute to existing and new codeblocks for live component rendering
  • Updates code language from tsx to mdx for consistency with the framework
  • Standardizes import paths to use @theme alias across all documentation

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/source-code.mdx Updated existing codeblock to use mdx language with preview attribute, standardized import path to @theme, and removed trailing semicolon
website/docs/en/ui/components/source-code.mdx Updated existing codeblock to use mdx language with preview attribute, standardized import path from @rspress/core/theme to @theme, and removed trailing semicolon
website/docs/zh/ui/components/edit-link.mdx Added new preview codeblock demonstrating EditLink component usage
website/docs/en/ui/components/edit-link.mdx Added new preview codeblock demonstrating EditLink component usage
website/docs/zh/ui/components/doc-footer.mdx Added new preview codeblock demonstrating DocFooter component usage
website/docs/en/ui/components/doc-footer.mdx Added new preview codeblock demonstrating DocFooter component usage

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

@github-actions
Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 3 project(s) in monorepo.

📊 Quick Summary (Click to expand)
Project Total Size Change
node 8.9 MB ➡️ -5.2 KB (-0.1%)
web 14.9 MB ➡️ 21.8 KB (0.1%)
node_md 1.1 MB ➡️ 562.0 B (0.0%)
📋 Detailed Reports (Click to expand)

📁 node

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

📌 Baseline Commit: 8a6d0fddd4 | PR: #2903

Metric Current Baseline Change
📊 Total Size 8.9 MB 8.9 MB -5.2 KB (-0.1%)
📄 JavaScript 0 B 0 B N/A
🎨 CSS 0 B 0 B N/A
🌐 HTML 8.9 MB 8.9 MB -5.2 KB (-0.1%)
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: node Bundle Diff

📁 web

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

📌 Baseline Commit: 8a6d0fddd4 | PR: #2903

Metric Current Baseline Change
📊 Total Size 14.9 MB 14.9 MB 21.8 KB (0.1%)
📄 JavaScript 14.3 MB 14.3 MB 21.8 KB (0.1%)
🎨 CSS 115.4 KB 115.4 KB 0 B (0.0%)
🌐 HTML 0 B 0 B N/A
📁 Other Assets 512.9 KB 512.9 KB 39.0 B (0.0%)

📦 Download Diff Report: web Bundle Diff

📁 node_md

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

📌 Baseline Commit: 8a6d0fddd4 | PR: #2903

Metric Current Baseline Change
📊 Total Size 1.1 MB 1.1 MB 562.0 B (0.0%)
📄 JavaScript 0 B 0 B N/A
🎨 CSS 0 B 0 B N/A
🌐 HTML 0 B 0 B N/A
📁 Other Assets 1.1 MB 1.1 MB 562.0 B (0.0%)

📦 Download Diff Report: node_md Bundle Diff

Generated by Rsdoctor GitHub Action

@SoonIter SoonIter merged commit 6e2c0c8 into main Dec 18, 2025
17 checks passed
@SoonIter SoonIter deleted the syt/add-tag branch December 18, 2025 11:03
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