Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Closes #69. Allow .yml file extension for content files.
Browse files Browse the repository at this point in the history
  • Loading branch information
dahrens committed Oct 22, 2017
1 parent 834a210 commit a6b240a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/content/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default function prepPage(meta, options, isDev) {
cached.body = parsers
.mdParser(parsers.md, options)
.render(_rawData.body) // markdown to html
} else if (fileName.search(/\.yaml$/) > -1) {
} else if (fileName.search(/\.(yaml|yml)$/) > -1) {
cached.body = parsers.yamlParser().render(_rawData.body) // yaml to json
}
}
Expand Down Expand Up @@ -177,7 +177,7 @@ export default function prepPage(meta, options, isDev) {
if (meta.fileName.search(/\.md$/) > -1) {
const { attributes, body } = fm(source)
cached.data = { attributes, body }
} else if (meta.fileName.search(/\.yaml$/) > -1) {
} else if (meta.fileName.search(/\.(yaml|yml)$/) > -1) {
cached.data = { attributes: {}, body: source }
}
}
Expand Down

0 comments on commit a6b240a

Please sign in to comment.