-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
[docs-infra] Add mdx support to vale lint #769
Conversation
Netlify deploy preview |
61b0857
to
83cde7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point 20. of #588 doesn't make it super clear that MDX is compatible with a great UX for developers. I imagine that it's solvable, but it's it's not, it seems to mean that we need to remove MDX and go back to the previous approach that yields better performance.
I'll look into it, seems that we'd need to lean in more into server components there to fix it instead of passing around the code snippets in React context.
Compressed it's about the same though, comparing the dialog pages:
Neither old or new docs get stellar ratings on PageSpeed Insights too:
We should be able to do better though with just a docs website.
@@ -9,7 +9,13 @@ MinAlertLevel = warning | |||
# 4. You can test locally by replacing the url with the file path of the generated zip | |||
Packages = Google, https://github.com/mui/material-ui/raw/HEAD/docs/mui-vale.zip | |||
|
|||
[formats] | |||
mdx = md | |||
|
|||
[*.md] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of magic, it lint mdx too, it doesn't need to be:
[*.md] | |
[*.{md,mdx}] |
so I didn't change it 🤷♂️
This isn't caused by MDX, but the Next.js App Router. |
A quick fix for a regression that I noticed while fixing mui/material-ui#44277. We were no longer linting the docs. This got broken with #538.
Ideally, we could use errata-ai/vale#841, but it's not there. Instead, there are a bunch of examples online on how this can be done https://github.com/search?q=%5Bformats%5D+mdx+%3D+md&type=code.
We will need to propagate this to the other repositories. But unclear if we should do it just yet, we might want to wait.
Point 20. of #588 doesn't make it super clear that MDX is compatible with a great UX for developers. I imagine that it's solvable, but it's it's not it seems to mean that we need to remove MDX and go back to the previous approach that yields better performance.