-
-
Notifications
You must be signed in to change notification settings - Fork 111
Format Markdown files with mdformat #597
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
Conversation
983e05b to
e08d0d4
Compare
e08d0d4 to
c16897d
Compare
3e25c6c to
9eae24d
Compare
|
Ready! :) See the "To consider" section for some things to discuss/consider. |
It is fine for now. I thought mdformat supports a config file argument to move it to
We could improve
It looks fine to me for now. |
joseluisq
left a comment
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!
Description
Formats all (almost) Markdown files with
mdformatand themdformat-mkdocsplugin.Adds
mdformat --checkin a step to the docs CI workflow.Related Issue
n/a
Motivation and Context
As discussed in:
How Has This Been Tested?
Locally and via the the new CI step.
Screenshots (if appropriate):
To consider
I added the configuation file (
.mdformat.toml) because it makes it easier to runmdformatin various places with the same config.I wanted to add
mdformatto the Dockerfile, unfortunately,--excluderequires Python 3.13and themkdocs-materialimage still uses Python 3.11. It could be changed to though if you think that would be a better experience as well (either by usinguvto runmdformat` or changing the base image).It would then also make it possible to add it to the Makefile.
I enabled
--compact-tablesto avoid sweeping formatting changes in the tables but we could remove that.It is also possible to format code blocks. I tried it out with the
mkdocs-beautyshfor shell scripts andmkdocs-configfor TOML, JSON, and YAML files. Shell scripts didn't fully "work" due to the comments in multiline arguments. It would require a trailing slash at the end of those comments to avoid indentation changes in the next line. Viabeautyshit helped find two missing trailing slashes :)