yearn-devdocs icon indicating copy to clipboard operation
yearn-devdocs copied to clipboard

Upgrade Docusaurus to v3.2.1

Open rossgalloway opened this issue 10 months ago • 2 comments

This pull request closes issue https://github.com/yearn/yearn-devdocs/issues/425 by upgrading the docusaurus version of the docs site to the most current (3.2.1). This upgrade has breaking changes that require other dependency upgrades:

  • MDX-js/react upgraded to v3.0.1
  • React upgraded to v18.3.1
  • Typescript updated to v5.4.5
  • katex and math updated to newest versions (v7 and 6 respectively)

This change also requires a migration to ES Modules for imports.

The change from MDX v1 to MDX v3 required changes to various markdown files, with most changes being related to the way MDX 3 deals with the < character. It needs to be escaped unless it is used as part of a JSX statement. In making the changes to some of the files to get everything to compile correctly, I updated some other markdown formatting problems.

Docusaurus V3 also requires a different naming system for versioned sidebars, which was already being implemented in the newer sidebars, but the old ones are now fixed as well.

This upgrade paves the way for the addition of Mermaid as requested in https://github.com/yearn/yearn-devdocs/issues/400. I will make a pull request for that change, but it is dependent on this pull request.

rossgalloway avatar May 03 '24 20:05 rossgalloway

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yearn-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 6, 2024 7:13pm

vercel[bot] avatar May 03 '24 20:05 vercel[bot]

It looks like the node version that the checks are running on is out of date. Docusaurus v3 requires >18. Not sure how to update this. (nvm fixed this (h/t @MarcoWorms )

The linter check is saying there are bad links (Status: 403), but they both seem to be accessible when I try to go manually.

rossgalloway avatar May 03 '24 21:05 rossgalloway

@MarcoWorms the vercel preview has now been fixed by Facu. Ready for your review. Things are looking good on my end.

rossgalloway avatar May 14 '24 15:05 rossgalloway