-
Notifications
You must be signed in to change notification settings - Fork 11
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
Ignore front-matter flag/config #154
Comments
👍🏽 help wanted! |
@bwplotka this is a persistent pain in my butt and i'd like to contribute a PR for it; the few issues arising from this are:
Asume we can add The latter options could be derived from .editorconfig but it requires adding support for it in mdox, right? The flags that are interesting there are I'd like your input here, mainly around the flags to support this, or if .editorconfig support is desired. |
Skipping does not sounds too bad. Never seen editor config convention, not sure how popular it is, but long term we might want a separate config file or so. Curious what's wrong with front matter reorder/formatting? Maybe it's better to ensure there are options you would be happy with e.g. indent size or so? Another idea would be to check the current indentation for the first item in the yaml and persist that? Less config options= better |
Front-matter reordering would require review, and we'd like to keep that on markdown-side only. Also asuming from a dataset of about a 1000 pages, not all input is trustworthy so we can't just mdox fmt and be done with it. Suppose it's an issue from a git history perspective as well as the blame on the metadata would change by reordering, etc. Editorconfig does present a challenge; yes, someone can add *.md settings, but this is technically *.yaml; While I'm happy it's an open standard and has quite a bit of adoption, it was just in avoidance of having fine grained skip flags. can we go with |
I'd like to use mdox to reformat markdown documents (hugo), but not touch the front-matter. Currently the front-matter gets reordered and reindented, rather than being kept as is.
The text was updated successfully, but these errors were encountered: