* Format JSON files.
Currently we store JSON as a single line in files. We should prettify it
like we do the other formats.
* Add output parsers to the frontmatter list.
* Cleanup frontmatter format parser options.
* Support writing frontmatter in TOML and JSON.
Right now we can read TOML or JSON frontmatter by inferring,
but we can only write frontmatter in YAML. This change allows the
frontmatter format to be explicitly set for reading and writing.
* Fix frontmatter formatter.
* Update Frontmatter formatter tests.
* Update frontmatter format docs.
If a collection has no format specified, we try to infer the format from
the file extension when reading. This commit also allows us to infer the
format from the `extension` set in the config, so that we can still
create the correct format when making a new file.
Before, we always tried to infer a file's format, even if it was
explicitly specified in the collection's config. This commit makes it so
that we always use the format from the config if it is specified, and
only if it is not set do we try to infer it from the file extension.
When entries were loaded for the editorial workflow dashboard, they were
all assumed to be FrontMatter/MarkDown files. This PR allows them to be
any supported format.
* Clean up frontmatter formatter.
* Move `formatToExtension`.
* Use plain objects for file formatters.
* Use same parsers for files and frontmatter.
We want to use our file parsers for frontmatter, instead of the builtin
ones, as they process some formats (images, dates) properly.
* Cleanup YAML frontmatter parser code.