Repository navigation
fix(website): Crowdin: downgrade mdx parser to v1.2 - #11432
Merged
Merged
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Crowdin regularly improves its source file parsers.
Unfortunately, the new MDX parser v2 that they rolled out recently doesn't support our custom
{#headingId}syntax.When we cut a new docs version, this leads to errors for all newly created MDX files (existing ones keep their initial parser), and blocked our website deploy after the v3.9 release:
To unblock us, I had to downgrade the MDX parser to v1.2, which was the one they used a few months ago (v3.8 docs are using that version).
Unfortunately, the Crowdin setup I now use is not ideal because this requires duplicating the source file patterns:
This ensures that this MDX parser is not applied to all
docs/**andversioned_docs/**files (that may contain images, category json/yml files, and other file types that are not mdx)To avoid being stuck in the future, I'll make it a priority to support a new markdown heading syntax + a CLI option to migrate old syntax to the new one. This way, we'll be able to revert this temporary workaround and use the new MDX parsers.
Note: to find out the parser version of a Crowdin source file, you can use DevTools to inspect the source file icon on their UIs, they have a class such as
file_type_<parser_version>:Test Plan
Tested locally that I can upload a newly cut docs version
Test links
https://deploy-preview-11432--docusaurus-2.netlify.app/