-
Notifications
You must be signed in to change notification settings - Fork 0
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
docs: Format markdown documents #66
Conversation
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.
A markdown formatter woudl indeed be nice to have, but how about using mdformat instead?
I'm suggesting it for the following reasons:
- it has a pre-commit config, so we could just add it to
.pre-commit-config.yaml
- it is in python, so we can add it to our poetry
docs
dependency group - It is also CommonMark-compliant
They have a readme section on why using mdformat instead of prettier. What do you think?
@cmdoret : haha, I went already on this journey, I would not recommend mdformat, I tried it in the past, the docs about prettier having troubles is outdated. I used prettier always in my toolchains and never had any trouble. Prettier is at version 3.3 etc and pretty heavily maintained. Although I look for some dedicated/fast tool to format commonmark (pandoc etc. is another beast but to wide-scoped). About the My suggestion is Githooks, run the formatting in containerized (docker, podman, nix compatible) shared hooks, everywhere , use it in CI as well with some setup..., have it stable. |
I see, 👍 for prettier then (as long as it's containerized).
All good for GitHooks, I have no preference, as long as it automates actions on git commits. |
@cmdoret : Ahh ok, so you dont run it on CI, because you actually can do that =) (its probably a subscription model, payed lol). But dont do that lol. Software Best Practice Goal for every project I wanna drive further is: CI runs exaclty the same as you run locally, no excuses ;) (beeing pragmatic here, ok minimal differences are allowed, but not with version pinning etc., I have enough painful experiences with these topics lol) |
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.
✔️ for the prettier setup, we can figure out pre-commit / ci separately
Thanks for this @cmdoret, @gabyx! I'm sorry for being late to the discussion. It looks like we are running into rendering issues for our docs when using |
It is also a bit disappointing that our checks did not catch this - it is true that the docs are technically building, but still a warning would have been nice 😞 |
Oh, yes thats wos dumb. Good that you checked. May be we should ignore the prettier in the sphynx doc etc. |
I think it cannot, markdown is pretty agnostic thats also good, (not like latex where you get shitty errors) so it will render but corrupted... it is how it is =). Or what checks to you relate to? |
Description
Format all markdown docs with
prettier
.Reason for the Change
prettier
because there is no better easier tool out there which works nicely. It adheres toCommonMark
etc. Ok there ispandoc
and other formatters. We can discuss that in BPA for language guidlines ondocs
maybe.