-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Break on unsupported file format. #797
Comments
We could throw on |
I think throwing on an unsupported format is a good idea. I think we should also throw if the extension is unsupported and there isn't a valid format set. We shouldn't error if there is an unknown extension but a valid format. |
Good point, then if people want to force an abnormal extension, they have to explicitly set the format. |
Current status (after #796):
|
@tech4him1 nice table! This conversation is happening in a few places, is there a canonical issue or PR that we can condense down to? |
Sure, most of the discussion here relates to #776, I'll move it there. |
The core of this issue is still just throwing on an unsupported format, so I'll leave it open until that gets merged. I moved the other discussion to #776. |
@Benaiah @erquhart Should we account for "common misspellings" on the formats? yml vs yaml, md vs markdown? Right now it's really weird -- we account for the misspellings, but the extension is saved as |
@tech4him1 Yes, I think those alternative format names should be aliases for the ones we use. |
We just can't change the extension on existing entries (don't want to bother with the tree manipulation to produce a rename). But yeah, that should work. |
@erquhart What about the |
If we don't need it, let's drop it. |
Currently, if an unsupported file format is set on a collection (
format: ini
), we simply assume that it should be saved as YAML front-matter (see #748 and #776). I think in this case, when the user has explicitly set a format, and we are not inferring at all, it makes more sense to just throw an "Invalid Config" error. @erquhart @Benaiah?Expanded discussion: #776 (comment)
The text was updated successfully, but these errors were encountered: