yearn / yearn-devdocs

yearn documentation
https://docs.yearn.fi
79 stars 69 forks source link

Upgrade Docusaurus to v3.2.1 #426

Closed rossgalloway closed 1 month ago

rossgalloway commented 2 months ago

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:

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.

vercel[bot] commented 2 months ago

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
rossgalloway commented 2 months ago

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 commented 1 month ago

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