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

update website to docusaurus v3 #544

Closed
Arhell opened this issue Jan 2, 2024 · 3 comments
Closed

update website to docusaurus v3 #544

Arhell opened this issue Jan 2, 2024 · 3 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@Arhell
Copy link
Member

Arhell commented Jan 2, 2024

  1. node version upgrade to v18 (update nerlify)
  2. update docs style to fit.
    I recommend updating by version
    for example
    https://github.com/karmada-io/website/tree/main/versioned_docs/version-v1.3 first PR
    https://github.com/karmada-io/website/tree/main/versioned_docs/version-v1.4 second PR or other version
  3. and at last,try to update docusaurus v3

/assign

@Arhell Arhell added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 2, 2024
@samzong
Copy link
Member

samzong commented Jan 5, 2024

I've successfully upgraded a Docusaurus site to version 3.0.1 (latest), and I'd like to share some issues I encountered along the way.

The good news is that all the information you need is available at: Docusaurus v3 Migration Docs.

One thing to note is that Docusaurus now parses all files with MDX by default. This means that even markdown files are treated as MDX, which can be problematic since code snippets in markdown files are parsed as JSX.

Changing this could be a huge task.

I used the following command to get an idea of how many files might be problematic, and it turns out there are about 126 markdown files that need to be revised.

npx docusaurus-mdx-checker

[ERROR] 126/1733 MDX files couldn't compile!

The main issues I came across were:

  • Incorrect rendering of shorthand links: <https://github.com/> should be formatted as Github
  • Unescaped curly braces: {POD_NAME} should be escaped as \{POD_NAME\}

These issues are acknowledged in the Docusaurus blog post Markdown and MDX improvements, with promises of future fixes. It might be worth waiting to see how these are resolved.

Additionally, I recommend integrating docusaurus-mdx-checker into Github CI pipeline to catch these issues automatically.

@RainbowMango
Copy link
Member

Does the Upgrading Dependencies is a good next step?

@Arhell
Copy link
Member Author

Arhell commented Jan 10, 2024

Does the Upgrading Dependencies is a good next step?

No, first we need to prepare documentation for MDX v3.0, because without this there will be the errors that were here #510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants