Yoast / developer

The Yoast Developer portal based on Docusaurus
6 stars 15 forks source link

Updates Docusaurus to 3.5 #319

Closed mhkuu closed 1 month ago

mhkuu commented 2 months ago

Fixes #316

Summary

This PR updates Docusaurus to the latest version (3.5). This PR addresses all required changes to make the migration.

Relevant technical choices

The individual commits show how the updating took place:

  1. 7c5ae4cd59ec5e30af34693fef74646d4aebbe36 updates the dependencies as per https://docusaurus.io/docs/migration/v3#upgrading-dependencies
  2. a4e3a71ecb1a73c643af8c9127a656ee25596570 fixes some Markdown as per https://docusaurus.io/docs/migration/v3#using-the-mdx-checker-cli
  3. 2f7c0473ff21304b37f0a1ecc667018b9cff6db9 transforms the configuration file, with the most pressing change being the way we import themes, see https://docusaurus.io/docs/migration/v3#prism-react-renderer-v20
  4. 643e56d1548f6c0776729b5beef3e7afb7b99dd5 fixes the MDX loader for the changelog plugin, see https://github.com/facebook/docusaurus/pull/8972 for context.
  5. 8b4586a2dec14f590f97a3f029c0af4d7cd442f6 updates the imports, as some stuff has moved from @docusaurus/theme-common/internal to plugin-content-blog/client or plugin-content-docs/client.
  6. b8b89d92e3803da4f1d8300260243aec794db446 moves plugin-content-blog to an actual dependency instead of a development dependency.

Test instructions

This PR can be acceptance tested by following these steps:

  1. Run docusaurus clear and delete node_modules to prevent any caches.
  2. Run yarn to install all dependencies.
  3. Run npx docusaurus-mdx-checker and confirm all files are compiled successfully.
  4. Run yarn start and confirm the developer docs are locally built and served successfully.
  5. Run yarn build and yarn serve to confirm the developer docs can also be successfully built for production.
  6. Do a few smoke tests to confirm everything works as before.
cloudflare-workers-and-pages[bot] commented 2 months ago

Deploying yoast-developer with  Cloudflare Pages  Cloudflare Pages

Latest commit: eaa6014
Status: ✅  Deploy successful!
Preview URL: https://e26af1eb.yoast-developer.pages.dev
Branch Preview URL: https://update-docusaurus.yoast-developer.pages.dev

View logs