Skip to content
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

chore(docs): format mdx files #754

Merged
merged 4 commits into from
Apr 29, 2024
Merged

chore(docs): format mdx files #754

merged 4 commits into from
Apr 29, 2024

Conversation

sripwoud
Copy link
Contributor

@sripwoud sripwoud commented Apr 26, 2024

Fix #503

prettier doesn't not have proper support for MDX v3.
So we need to use another formatter to format the mdx files used for the docs website.
Docusaurus recommends remark.
So this PR sets up remark in the docs apps package and uses it to format all mdx files.

Test plan

  • yarn format should be successful
  • modify some mdx file: yarn format:write should reformat it correctly
  • yarn workspace semaphore-docs start: should start the server without warnings or errors
  • navigate to the doc pages modified by this PR: everything should be rendered correctly

@sripwoud sripwoud added documentation 📖 Improvements or additions to documentation devops 🔧 Operations management and dev tools labels Apr 26, 2024
@sripwoud sripwoud self-assigned this Apr 26, 2024
@vplasencia
Copy link
Member

vplasencia commented Apr 26, 2024

Hey! Thanks for testing it. Could you try cd apps/docs and then yarn start and let me know if you can see the docs website without any issues?

@sripwoud sripwoud marked this pull request as draft April 26, 2024 13:09
@sripwoud
Copy link
Contributor Author

sripwoud commented Apr 26, 2024

Hey! Thanks for testing it. Could you try cd apps/docs and then yarn start and let me know if you can see the docs website without any issues?

Right, it indeed breaks the build. But I find a way to both format the mdx file and have a working build.

And we have another issue I captured here #756 : the ci should have detected this PR broke the build at first

@sripwoud sripwoud force-pushed the fix/format-mdx branch 2 times, most recently from 065cfa3 to 3c2ccf1 Compare April 26, 2024 13:56
Copy link

openzeppelin-code bot commented Apr 26, 2024

chore(docs): format mdx files

Generated at commit: 40f2e153807be33e57f4897235ecd1b359295a73

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
0
0
0
4
16
20
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@sripwoud sripwoud marked this pull request as ready for review April 26, 2024 13:58
@sripwoud
Copy link
Contributor Author

sripwoud commented Apr 26, 2024

@vplasencia ready for review

package.json Show resolved Hide resolved
Copy link
Member

@vplasencia vplasencia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Thank you very much.

I just left one comment

apps/docs/package.json Outdated Show resolved Hide resolved
@vplasencia vplasencia merged commit 0b9ba37 into main Apr 29, 2024
5 checks passed
@vplasencia vplasencia deleted the fix/format-mdx branch April 29, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops 🔧 Operations management and dev tools documentation 📖 Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prettier doesn't format MDX files properly
2 participants