ziti-doc icon indicating copy to clipboard operation
ziti-doc copied to clipboard

upgrade docusaurus

Open qrkourier opened this issue 2 months ago • 0 comments

Docusaurus builds openziti.io and is in a major version transition that introduces many breaking changes.

We've already adopted most of the breaking changes in v2, and there are more to adopt in v3. Docusaurus plans to finish the transition to MDX and strict (Commonmark) Markdown in v4.

To stay abreast of features and fixes we must adopt v3 eventually, and Docusaurus has done the tedious work to publish a graceful migration guide: https://docusaurus.io/docs/migration/v3

For us, the graceful transition involves several stages of conforming our docs codebase to the changes before upgrading Docusaurus itself.

  1. start building with Node.js LTS v18+
  2. upgrade to React v18 (coincidentally the same as the new minimum Node.js, not coupled versions)
  3. stop using and retroactively replace now-unsupported Markdown and HTML features or opt-in to strict Commonmark, e.g., {} and <> enclosures have different meanings for MDX v3, and Docusaurus assumes all pages are MDX unless frontmatter has format: md or a global config to detect Markdown, four spaces no longer means pre-formatted (use fences instead), etc.
  4. add a visual regression CI check so we can notice unexpected variations in the rendering automatically and in the future
  5. add an MDX compilation CI check to finalize any changes necessary before upgrade, and notice breaking changes in the future, e.g., npx docusaurus-mdx-checker
  6. upgrade Docusaurus to v3 and configure Vercel builds for v3

qrkourier avatar Apr 17 '24 14:04 qrkourier