-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Add comments to generated files indicating they were generated #1512
Conversation
🦋 Changeset detectedLatest commit: 6f563e3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@amikofalvy is attempting to deploy a commit to the Fuma Team on Vercel. A member of the Team first needs to authorize it. |
Can we put it at content body (below the frontmatter)? |
I've updated the PR to use the MDX style comment format and positioned it beneath the frontmatter section. Example indicating positioning follows:
|
… within a MDX codeblock
|
||
This content is added as MDX comments below the frontmatter: | ||
|
||
{/* prettier-ignore-start */} |
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 required otherwise the example comment gets reformatted (via prettier) as
{/_ This file was auto-generated by Fuma Docs.
Do not edit this file directly. Any changes should be made by running the generation command again. _/}
and it renders with the underscores which is incorrect.
Thanks for contributing! |
Originally, we had discussed using MDX style comments, but I had done some reading on frontmatter and it wasn't clear if the all frontmatter parsers would support adding a MDX style comment (or anything) above the frontmatter declaration in the mdx file.
So instead, I opted for YAML style comments within the frontmatter section.
One good thing about the YAML style comment is that it is less verbose syntactically and doesn't involve as many special characters required to escape the comment area.
If you disagree with the decision to use YAML style, I can re-implement in the MDX style comment and resubmit the PR.