From a6b240a1500a8861ee8cbfdae0f3cb2b34f235c0 Mon Sep 17 00:00:00 2001 From: Dennis Ahrens Date: Sun, 22 Oct 2017 19:08:13 +0200 Subject: [PATCH] Closes #69. Allow .yml file extension for content files. --- lib/content/page.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/content/page.js b/lib/content/page.js index f554d18..a68eb39 100644 --- a/lib/content/page.js +++ b/lib/content/page.js @@ -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 } } @@ -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 } } }