-
-
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(v2): exhaustive BlogPostFrontMatter schema validation #4759
Conversation
[V2] Built with commit 3a65621 |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4759--docusaurus-2.netlify.app/ |
e3f0ae6
to
9db8ac4
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.
Thanks!
Overall that looks good. Added a few useful changes to do
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.
Thanks for reviewing. I add an annotation for deprecated fields and provide warning messages for them.
[V1] Built with commit 3a65621 |
Thanks, that looks great! Disabling the warnings for now as our own blog posts are still using those frontmatters (content is shared between v1/v2 so we can't update the frontmatter) |
Thanks. Now I can work on the docs frontmatter smoothly :D |
Motivation
From #4591.
What the PR does
I found the after parsing the frontmatter use
gray-matter
package, thedate
field will be converted to aDate object
, not a raw string. But we are treating it as a string. Currently there is no problem about it, but maybe furture.Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Unit test.