From 326dd48cc0ea3ade44ee30ebc113da73386f0e6e Mon Sep 17 00:00:00 2001 From: Caleb Date: Fri, 1 Dec 2017 16:56:29 -0700 Subject: [PATCH] Remove support for markdown and html as explicit formats. The `frontmatter` format is the correct one to use here. --- src/formats/formats.js | 11 ++++------- src/reducers/collections.js | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/formats/formats.js b/src/formats/formats.js index 81566148..2fd5e66a 100644 --- a/src/formats/formats.js +++ b/src/formats/formats.js @@ -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]; } diff --git a/src/reducers/collections.js b/src/reducers/collections.js index e983312d..4cd50cd1 100644 --- a/src/reducers/collections.js +++ b/src/reducers/collections.js @@ -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');