Remove support for markdown and html as explicit formats.

The `frontmatter` format is the correct one to use here.
This commit is contained in:
Caleb 2017-12-01 16:56:29 -07:00 committed by Shawn Erquhart
parent d5ff92e47e
commit 326dd48cc0
2 changed files with 5 additions and 8 deletions

View File

@ -4,19 +4,19 @@ import jsonFormatter from './json';
import FrontmatterFormatter from './frontmatter';
export const supportedFormats = [
'markdown',
'yml',
'yaml',
'toml',
'json',
'html',
'frontmatter',
];
export const formatToExtension = format => ({
markdown: 'md',
yml: 'yml',
yaml: 'yml',
toml: 'toml',
json: 'json',
html: 'html',
frontmatter: 'md',
}[format]);
export function formatByExtension(extension) {
@ -37,9 +37,6 @@ function formatByName(name) {
yaml: yamlFormatter,
toml: tomlFormatter,
json: jsonFormatter,
md: FrontmatterFormatter,
markdown: FrontmatterFormatter,
html: FrontmatterFormatter,
frontmatter: FrontmatterFormatter,
}[name];
}

View File

@ -39,7 +39,7 @@ function validateCollection(configCollection) {
const selectors = {
[FOLDER]: {
entryExtension(collection) {
return collection.get('extension') || formatToExtension(collection.get('format') || 'markdown');
return collection.get('extension') || formatToExtension(collection.get('format') || 'frontmatter');
},
fields(collection) {
return collection.get('fields');