Skip to content

Migrate to Docusaurus 3.0.0#541

Merged
chvmvd merged 5 commits into
masterfrom
migrate-to-docusaurus-3
Nov 5, 2023
Merged

Migrate to Docusaurus 3.0.0#541
chvmvd merged 5 commits into
masterfrom
migrate-to-docusaurus-3

Conversation

@chvmvd
Copy link
Copy Markdown
Contributor

@chvmvd chvmvd commented Nov 4, 2023

Docusaurus 3.0.0に移行しました。#531

やったこと

  • 依存関係をアップデートしました。
  • エラーが出たので、docusaurus.config.jsを修正しました。
  • pタグで囲うとMDX v3の仕様でセマンティクスが崩れるので、修正しました。
    <p>
     <span>Hello</span>aaaa
    </p>
    <p><p><span>Hello</span>aaaa</p></p>
    とパースされてしまいます。
  • math関係のパッケージをアップデートしました。
  • MDX v3だと独立行に対してpタグを挿入する挙動をとるので、インラインのものは単一行になるようにしました。

問題点

- Prettierのフォーマット結果とMDXの文法がマッチしておらず、Prettierをかけてからビルドするとエラーとなります。エラー箇所は、闇があまりにも深すぎるのでprettier-ignoreで一旦逃げました。#542

  • PrettierがMDX v1に対応している関係で、MDX v3でうまくフォーマットされないので、フォーマットが崩れるところはprettier-ignoreで逃げました。

@chvmvd chvmvd requested a review from chelproc November 4, 2023 08:20
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Nov 4, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 97a6e73
Status: ✅  Deploy successful!
Preview URL: https://4afb6efb.utcode-learn.pages.dev
Branch Preview URL: https://migrate-to-docusaurus-3.utcode-learn.pages.dev

View logs

@chvmvd chvmvd marked this pull request as draft November 4, 2023 08:24
@chvmvd chvmvd force-pushed the migrate-to-docusaurus-3 branch from e608a0d to 5d67d2c Compare November 4, 2023 10:30
@chvmvd chvmvd force-pushed the migrate-to-docusaurus-3 branch from 5d67d2c to 44dd0e6 Compare November 4, 2023 11:56
@chvmvd chvmvd marked this pull request as ready for review November 4, 2023 12:37
Base automatically changed from remove-strong-prop-from-term-component to master November 4, 2023 14:25
@chvmvd chvmvd marked this pull request as draft November 4, 2023 14:26
@chvmvd chvmvd force-pushed the migrate-to-docusaurus-3 branch from f98bd1c to 1d83199 Compare November 4, 2023 15:14
@chvmvd chvmvd mentioned this pull request Nov 4, 2023
@chvmvd chvmvd marked this pull request as ready for review November 4, 2023 15:56
@chvmvd chvmvd requested a review from aster-void November 4, 2023 16:09
Copy link
Copy Markdown
Contributor

@aster-void aster-void left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

詳しくないですが、エラーが出てないのでいいと思います 👍
ユーザ定義のインライン要素が正しく認識されてないんですかね?

@chvmvd
Copy link
Copy Markdown
Contributor Author

chvmvd commented Nov 5, 2023

PrettierがMDX v1形式でフォーマットするので、MDX v3ではうまくパースできなくなってしまうという感じですね...

@chvmvd chvmvd merged commit 1af77cd into master Nov 5, 2023
@chvmvd chvmvd deleted the migrate-to-docusaurus-3 branch November 5, 2023 05:35
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.

2 participants