Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Docusaurus to v3 #1

Merged
merged 13 commits into from
Nov 26, 2024
Merged

Upgrade Docusaurus to v3 #1

merged 13 commits into from
Nov 26, 2024

Conversation

CristianLara
Copy link
Owner

Following both the v2 and v3 migration guides

This is basically my second time doing this as I performed the same upgrade for Ax in my fork: https://github.com/CristianLara/Ax. This PR his heavily inspired by the work done there.

Before After
image image
Before After
image image

I moved the old website directory from `website/` to `website-old/` and ran `npx @docusaurus/migrate migrate website-old website`

Various things are still broken, fixes coming in next commits
The migration script completely ignored our previous landing page. Here we migrate it ourselves manually and drop most of our custom styling in favor of the new docusaurus styling.
These are not yet configured for this fork
I noticed this hidden docusaurus folder is new after the upgrade
`yarn upgrade @docusaurus/core@latest ││ @docusaurus/preset-classic@latest`

And then manually upgrading other dependencies.

Docusaurus v3 by default interprets all markdown files as mdx. Our md docs are not compatible with mdx yet and require some hand editing to fix. I don
t think we're planning to use mdx in our manually handwritten md docs so I've added an option to the docusaurus config to treat .md files as pure markdown.
This controls the theme for codeblocks. The specified themes are closer to the colors used in the old website
The old `<!--DOCUSAURUS_CODE_TABS-->` comments are deprecated, use the new `<Tabs>` component and convert this .md file to .mdx to utilize it.
Remove unused tags and components, improve styles
Based on old footer
Created this project under my personal algolia account specifically for the version of this site that will be hosted under my personal website.
Docusaurus has moved from mathjax to katex. We also make some small tweaks to some of the math in our md to match updated synatx for katex. I spot checked each of our md docs pages to find offenders.
@CristianLara CristianLara merged commit 4f0c73c into main Nov 26, 2024
@CristianLara CristianLara deleted the upgrade-docusaurus branch November 26, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant