Skip to content

Commit

Permalink
Remove support for markdown and html as explicit formats.
Browse files Browse the repository at this point in the history
The `frontmatter` format is the correct one to use here.
  • Loading branch information
tech4him1 authored and erquhart committed Dec 6, 2017
1 parent d5ff92e commit 326dd48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/formats/formats.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -37,9 +37,6 @@ function formatByName(name) {
yaml: yamlFormatter,
toml: tomlFormatter,
json: jsonFormatter,
md: FrontmatterFormatter,
markdown: FrontmatterFormatter,
html: FrontmatterFormatter,
frontmatter: FrontmatterFormatter,
}[name];
}
Expand Down
2 changes: 1 addition & 1 deletion src/reducers/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 326dd48

Please sign in to comment.