fix(cnwebsite): remove markdown.format 'detect' to fix JSX rendering in .md files#1025
Conversation
…ream
- Remove 'format: detect' from docusaurus.config.ts so .md files are
parsed as MDX (same as EN upstream), fixing JSX components like
Tabs/TabItem not rendering in getting-started and 55+ other pages
- Convert {#custom-id} heading syntax to {/*custom-id*/} (MDX v3
compatible) in 24 versioned docs (backward-compatibility-*.md,
versions 0.70-0.81)
- HTML comments in versioned docs are inside code fences, safe in MDX
Build verified: yarn build passes (67s).
❌ Deploy Preview for reactnativecn failed. Why did it fail? →
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR modernizes the React Native documentation configuration and guides by removing Mermaid format auto-detection settings, migrating heading anchor syntax to a new standardized format across versioned docs (0.70–0.81), and removing outdated code re-export examples from backward-compatibility guides. ChangesDocumentation Configuration and Format Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
问题
markdown.format: 'detect'导致所有.md文件按纯 Markdown 解析,JSX 组件(<Tabs>、<TabItem>等)不会被处理。影响 getting-started 及其他 55+ 个使用 Tabs 的页面。EN 上游没有此配置,默认全部按 MDX 解析。
改动
cnwebsite/docusaurus.config.ts中的format: 'detect',与 EN 上游保持一致{#custom-id}语法转换为 MDX v3 兼容的{/*custom-id*/}语法(backward-compatibility-*.md,版本 0.70-0.81)验证
yarn build通过(67s)。Summary by CodeRabbit
Documentation
Chores