Skip to content

fix(cnwebsite): 修复 Docusaurus 3.10 编译 + 调整 getting-started 顺序#5080

Closed
sunnylqm wants to merge 855 commits into
facebook:mainfrom
reactnativecn:fix/cnwebsite-build-20260512
Closed

fix(cnwebsite): 修复 Docusaurus 3.10 编译 + 调整 getting-started 顺序#5080
sunnylqm wants to merge 855 commits into
facebook:mainfrom
reactnativecn:fix/cnwebsite-build-20260512

Conversation

@sunnylqm
Copy link
Copy Markdown
Contributor

变更内容

编译修复

  • markdown.format: detect: Docusaurus 3.10 默认用 MDX 解析器处理所有 .md 文件,导致 HTML 注释和自定义 heading ID 等语法报错。设置 detect 后 .md 按标准 markdown 解析,.mdx 按 MDX 解析
  • 删除 versioned_docs 中的 HTML 注释: alex ignore、TODO 等注释在 MDX v3 中不合法,已批量清除
  • 删除自定义 heading ID: cndocs/legacy/native-components-android.md 中的自定义 ID 在 MDX 中被当作无效 JSX 表达式
  • 清理侧边栏: 移除对已删除文档的引用(metro、what-is-codegen、using-codegen、create-module-library)

getting-started 调整

  • Tab 顺序: 将 React Native CLI Quickstart 移到 Expo Go Quickstart 之前(符合 CN 文档不 promote Expo 的原则)
  • 默认 Tab: defaultGuide 从 quickstart(Expo) 改为 native(CLI)

验证

  • yarn --cwd cnwebsite build 编译成功
  • 79 个文件变更,主要是 versioned_docs 的 HTML 注释清理

sunnylqm and others added 30 commits June 28, 2023 23:13
同步 reactnative.dev 最新代码
补充了useColorScheme这个React hook的中文说明文档。
Added the Chinese explanation document for the React hook 'useColorScheme'.
* Update Debugging docs to no longer recommend Remote debugging (facebook#3702)

Co-authored-by: Alex Hunt <hello@alexhunt.io>

* Bump fast-xml-parser from 4.2.4 to 4.2.5 (facebook#3777)

Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 4.2.4 to 4.2.5.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](NaturalIntelligence/fast-xml-parser@v4.2.4...v4.2.5)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Upgrade got dependency (facebook#3776)

* feature: Move to GA4 (UA being reprecated in June)

Google Analytics is deprecating the older clients. This is the first
step to enable to newer client. This should be followed with a step to
remove the old client once we know data is flowing.

* Upgrade got dependency

Resolves dependabot alerts #26

* Use `https` links over `http` (facebook#3761)

* [docs] Update/simplify info around Metro for env setup (facebook#3673)

* [docs] Add Metro guide, update Metro config references (facebook#3772)

* [docs] Remove static config note in Metro guide, adjust formatting (facebook#3782)

* Improving Grammar and Clarity.md (facebook#3783)

Improving Grammar and Clarity in React Native's Performance Description

* Fix docs for onResponderGrant (facebook#3785)

* react-native-gradle-plugin renamed to @react-native/gradle-plugin (facebook#3786)

* Update _integration-with-existing-apps-kotlin.md

* Update _integration-with-existing-apps-kotlin.md

* Update _integration-with-existing-apps-java.md

* Update _integration-with-existing-apps-java.md

* Update _integration-with-existing-apps-kotlin.md

* Update how-to-build-from-source for 0.72+ (facebook#3659)

* Clarify documentation for turbomodules (facebook#3787)

* Clarify documentation for turbomodules

`codegenConfig` is stated in text that it's an array, but in code example it's an object.

Either the text or the code example should change.

* Fix linting issue

* Update the PR to reflect knowledge that the code sample is correct but documentation wrong

* Update FlatList Optimization Guide for FCs (facebook#3700)

* Update FlatList Optimization Guide for FCs

* fix lint

* Update docs/optimizing-flatlist-configuration.md

---------

Co-authored-by: Егорик <86266852+Huinko@users.noreply.github.com>
Co-authored-by: Nick Gerleman <nick@nickgerleman.com>

* [docs] Add guidance on repo build scripts (facebook#3788)

* [docs] add Chain React 2023 playlist link on staying-updated (facebook#3790)

* Bump semver from 5.7.1 to 5.7.2 (facebook#3791)

Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](npm/node-semver@v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Docusaurus v2.4.1 (facebook#3778)

* Bump word-wrap from 1.2.3 to 1.2.4 (facebook#3794)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: iOS backwards compatibility update (facebook#3775)

* Update backward-compatibility-fabric-components.md

Ensure backwards-compat docs refer to all necessary code changes.

reactwg/react-native-new-architecture#8 (comment)

* Update docs/the-new-architecture/backward-compatibility-fabric-components.md

Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>

* trim whitespace and fix typo

---------

Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>

* [website] swizzle DocVersionBanner, tweak wording (facebook#3800)

* tweak: improve wordiness on docs about bumping monorepo packages (facebook#3805)

* Fix typo in architecture-glossary.md (facebook#3806)

* docs: change js to tsx (facebook#3808)

* Update website to use JDK 17 (facebook#3812)

LGTM.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Gabriel Donadel Dall'Agnol <donadeldev@gmail.com>
Co-authored-by: Alex Hunt <hello@alexhunt.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Friedman <blakef@meta.com>
Co-authored-by: Pranav Yadav <Pranavyadav3912@gmail.com>
Co-authored-by: Waseem Kurne <55435990+waseemk7@users.noreply.github.com>
Co-authored-by: Pieter De Baets <pieterdb@meta.com>
Co-authored-by: Nicola Corti <corti.nico@gmail.com>
Co-authored-by: Stefan Wallin <github@stefan-wallin.se>
Co-authored-by: Егорик <86266852+Azelisi@users.noreply.github.com>
Co-authored-by: Егорик <86266852+Huinko@users.noreply.github.com>
Co-authored-by: Nick Gerleman <nick@nickgerleman.com>
Co-authored-by: David Leuliette <dleuliette@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: Connor Mullins <connorpmullins@gmail.com>
Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>
Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>
Co-authored-by: Lorenzo Sciandra <lsciandra@microsoft.com>
Co-authored-by: Stanley Ugwu <stanleyugwu2018@gmail.com>
Co-authored-by: kong <duguyihou@gmail.com>
# Conflicts:
#	website/versioned_docs/version-0.60/animated.md
#	website/versioned_docs/version-0.61/animated.md
#	website/versioned_docs/version-0.62/animated.md
#	website/versioned_docs/version-0.63/animated.md
#	website/versioned_docs/version-0.64/animated.md
#	website/versioned_docs/version-0.65/animated.md
#	website/versioned_docs/version-0.66/animated.md
#	website/versioned_docs/version-0.66/linking.md
#	website/versioned_docs/version-0.67/animated.md
#	website/versioned_docs/version-0.68/animated.md
#	website/versioned_docs/version-0.69/animated.md
sunnylqm and others added 27 commits March 10, 2026 10:08
* docs(cndocs): 同步翻译更新(高质量)

* fix: resync translations when upstream docs are newer

* chore: consolidate translation sync entrypoints

* docs(cndocs): 补齐 AccessibilityInfo 同步内容

* docs(cndocs): 同步 DevSettings 等文档更新
* docs(cndocs): 同步已移除日期选择器等文档

* docs(cndocs): 同步调试与输入相关文档

* docs(cndocs): 同步入门与运行时文档

* docs(cndocs): 同步更多资源文档

* fix: apply CodeRabbit auto-fixes

Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>

* fix: apply CodeRabbit auto-fixes

Fixed 2 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
* Bump serialize-javascript from 7.0.3 to 7.0.5 (facebook#5031)

* Bump serialize-javascript from 7.0.3 to 7.0.5

Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 7.0.3 to 7.0.5.
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](yahoo/serialize-javascript@v7.0.3...v7.0.5)

---
updated-dependencies:
- dependency-name: serialize-javascript
  dependency-version: 7.0.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* update lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Bump path-to-regexp from 0.1.12 to 0.1.13 (facebook#5032)

Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 0.1.12 to 0.1.13.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/v.0.1.13/History.md)
- [Commits](pillarjs/path-to-regexp@v0.1.12...v.0.1.13)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-version: 0.1.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* mixBlendMode is Android 10+ (facebook#5033)

* make project name and codegen config consistent (facebook#4924)

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* backport iOS native module changes to versioned docs (facebook#5036)

* [blog] Add 0.85 release post (facebook#5038)

* Add React Native 0.85 blog post

Add the release blog post for React Native 0.85 covering the new
Animation Backend, DevTools improvements, Metro TLS support, Jest
preset migration, and other breaking changes. Also adds missing
author entries to authors.yml.

* Add images for 0.85 blog post

Add animation backend demo GIFs for iOS and Android, and DevTools
macOS tabs screenshot. Update blog post to reference the new assets.

* Display animation backend GIFs side by side in a table

* Fix prettier lint for markdown table formatting

* Fix prettier table formatting via --write

* Apply PR feedback from Simek

- Use internal link for animations#caveats
- Add title parameter to metro.config.js and jest.config.js code blocks
- Use sh instead of text for CLI command code block

* Apply huntie's feedback and update date to 2026-04-07

- Simplify Expo SDK paragraph wording
- Update blog post date from 2026-04-06 to 2026-04-07

* [docs] Cut branch 0.85 (facebook#5040)

* Update releases-table.md for 0.85 (facebook#5041)

* Minor fixes to the 0.85 blogpost (facebook#5043)

* fix code snippet in 0.85 blog post (facebook#5045)

* [blog] Remove TextInput selection data from 0.85 blog post (facebook#5046)

* Add supported Node.js version examples to 0.85 blog post (facebook#5044)

Illustrate the EOL Node.js versions section with bullet points
showing which versions are supported and which are not.

https://claude.ai/code/session_012yWt7ffvxSWY3L9JsbyFu3

Co-authored-by: Claude <noreply@anthropic.com>

* migrate monorepo back to Yarn Classic (facebook#5047)

* docs(cndocs): sync linking.md

* docs(cndocs): sync getting-started.md

* docs(cndocs): sync switch.md

* docs(cndocs): sync network.md

* docs(cndocs): sync handling-touches.md

* docs(cndocs): sync permissionsandroid.md

* docs(cndocs): sync publishing-to-app-store.md

* docs(cndocs): sync timers.md

* docs(cndocs): sync scrollview.md

* docs(cndocs): sync sectionlist.md

* docs(cndocs): sync touchablehighlight.md

* docs(cndocs): sync flatlist.md

* docs(cndocs): sync usecolorscheme.md

* docs(cndocs): sync usewindowdimensions.md

* docs(cndocs): sync vibration.md

* docs(cndocs): cleanup orphaned files and sync removed-API stubs

* docs(cndocs): sync roottag.md

* docs(cndocs): sync upgrading.md

* docs(cndocs): sync style.md

* docs(cndocs): sync security.md

* docs(cndocs): sync progressbarandroid.md

* docs(cndocs): sync optimizing-flatlist-configuration.md

* docs(cndocs): sync pixelratio.md

* docs(cndocs): sync releases/release-levels.md

* docs(cndocs): sync platform-specific-code.md

* docs(cndocs): sync settings.md

* docs(cndocs): sync inputaccessoryview.md

* docs(cndocs): sync turbo-native-modules-android.md

* docs(cndocs): sync panresponder.md

* docs(cndocs): sync react-native-gradle-plugin.md

* docs(cndocs): sync the-new-architecture/pure-cxx-modules.md

* docs(cndocs): sync legacy/native-modules-ios.md

* docs(cndocs): sync flexbox.md

Add Tabs wrapper with JavaScript and TypeScript SnackPlayer examples
for 6 priority sections:
- Flex Direction
- Layout Direction
- Align Items
- Align Self
- Flex Basis, Grow, and Shrink
- Flex Wrap

Also updated:
- Heading levels (### to ##)
- Links to yoga documentation (yogalayout.com to yogalayout.dev)
- Proper markdown link syntax for prop references
- Code formatting consistency (single quotes)

* revert(cndocs): 恢复 getting-started.md,不照搬 EN Expo-first 版本

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>
Co-authored-by: bigcupcoffee <24373206+bigcupcoffee@users.noreply.github.com>
Co-authored-by: Brian Beckerle <49686530+brainbicycle@users.noreply.github.com>
Co-authored-by: Alan Lee <42583872+alanleedev@users.noreply.github.com>
Co-authored-by: Nicola Corti <corti.nico@gmail.com>
Co-authored-by: Zeya Peng <zeyap@users.noreply.github.com>
Co-authored-by: Alex Hunt <hello@alexhunt.dev>
Co-authored-by: Claude <noreply@anthropic.com>
…ies (#1011)

- Added versioned docs and sidebar for 0.85
- Added 6 missing sidebar entries: troubleshooting, set-up-your-environment, accessibility, global-PerformanceResourceTiming, global-intersectionobserver, global-intersectionobserverentry
同步以下文档的上游更新:
- _integration-with-existing-apps-ios: 补充缺失章节、更新动态模板链接、添加 Xcode 16 Gemfile 注释
- _integration-with-existing-apps-kotlin: 补充缺失章节、更新动态模板链接、翻译未翻译内容
- fabric-native-components-ios: 修复 className→class、补充 WebKit 框架章节
- fabric-native-components: 修复 spec→specs 目录名、更新 CodegenTypes API
- intro-react-native-components: 更新 react.dev URL、添加 ThemedImage 暗色模式支持
- keyboardavoidingview: 修复 admonition 语法
- refreshcontrol: 更新 SafeAreaView 导入源、修复 admonition 语法、补充平台标签
- legacy/native-modules-android: 修复 7 处 admonition 语法
* fix(cnwebsite): add missing static doc assets

* fix(cndocs): close linking tabs markup
* docs(cndocs): sync translation updates for 11 docs

* fix: apply CodeRabbit auto-fixes

Fixed 3 file(s) based on 4 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>

* fix: apply CodeRabbit auto-fixes

Fixed 2 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
…#1016)

翻译 _integration-with-existing-apps-kotlin.md 中未翻译的第 5、6 节内容:
- 5. 集成到 Android 代码中(更新 Application 类、创建 ReactActivity)
- 6. 测试集成效果(Metro 配置、发布版本构建)

影响版本:0.77 - 0.85
Sync code fence language with upstream EN docs.
- Update code fences from jsx to tsx to match upstream
- Add platform badges (Android/iOS) to version detection headers
- Add missing note about Android API version vs OS version mapping
)

Adds the operational skill document used by the Hermes Agent cron job
for React Native Chinese translation sync. Covers upstream merge workflow,
candidate verification, cnwebsite config sync, and PR creation.
…ig (#1021)

Translation sync:
- appearance.md: add 'App-level overriding' section, update getColorScheme/setColorScheme API docs, fix addChangeListener description
- view-style-props.md: add experimental_backgroundImage section, add imports, update mixBlendMode with Android 10+ and plus-lighter

Remove orphaned CN files (EN source deleted upstream):
- cndocs/metro.md
- cndocs/the-new-architecture/create-module-library.md
- cndocs/the-new-architecture/using-codegen.md
- cndocs/the-new-architecture/what-is-codegen.md

cnwebsite config sync (Docusaurus 3.9.2 → 3.10.0):
- Add @docusaurus/theme-mermaid dependency + mermaid config
- Add admonitions keyword support
- Update experimental_faster → faster
- Update isDeployPreview to support Vercel
- Bump all @docusaurus/*, react, and devDependency versions
- Add markdown.format: 'detect' to avoid MDX parsing of .md files
- Remove HTML comments in versioned docs (invalid in MDX v3)
- Remove custom heading ID {#imageview-example} (invalid MDX expression)
- Remove orphaned sidebar entries (metro, codegen, create-module-library)
- Reorder getting-started tabs: React Native CLI before Expo
- Update default guide to 'native' in TabsConstants
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

@sunnylqm is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@meta-cla meta-cla Bot added the CLA Signed label May 12, 2026
@sunnylqm sunnylqm closed this May 12, 2026
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.

10 participants