-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
feat(mdx-loader): wrap mdx content title (# Title
) in <header>
for concistency
#10335
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
Size Change: +581 B (+0.01%) Total Size: 10.9 MB
ℹ️ View Unchanged
|
`, | ||
{removeContentTitle: true}, | ||
); |
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.
Some test needed removeContentTitle: true throw Cannot handle unknown node 'mdxJsxFlowElement' and test returns content unmodified still fails thrown: "Exceeded timeout of 15000 ms for a test.
Why would that test now need removeContentTitle: true
. I tested locally and if it now timeouts, there must be a very good reason that we should find out.
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.
At first I couldn't really understand, and thought the timeout was coming from the visitor, but it turns out our test setup is not good and does not permit to stringify back to Markdown elements such as mdxJsxFlowElement
Going to fix it
# Title
) in <header>
for concistency
Note for the future:
For now the implementation is probably enough. |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
# Title
) in <header>
for concistency# Title
) in <header>
for concistency
Motivation
Fix #8476
For consistency, we want to wrap it all h1 in a
<header>
tag, for both of these cases:title: Title
front matter (already wrapped in<header>
# Title
in the MDX doc (previously not wrapped in<header>
, now fixed)Test Plan
CI & argos
Test links
https://deploy-preview-10335--docusaurus-2.netlify.app/docs
We now have
<header><h1>
and not just<h1>
Argos reports small visual changes on
# Title
immediately followed by## Section
, but in practice this is an improvement, consistent with front matter title behavior (less spacing)