commit 9593e7a4fd79d21c662b3b705862421e05a27dcc
parent 9ab9731f4095f41a0e68b6aba32747813c0c9853
Author: Konstantin Tarkus <hello@tarkus.me>
Date: Mon, 31 Aug 2015 07:40:50 +0300
Merge #240
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/api/content.js b/src/api/content.js
@@ -11,10 +11,9 @@ const CONTENT_DIR = join(__dirname, './content');
// Extract 'front matter' metadata and generate HTML
const parseJade = (path, jadeContent) => {
- const content = fm(jadeContent);
- const html = jade.render(content.body, null, ' ');
- const page = Object.assign({ path, content: html }, content.attributes);
- return page;
+ const fmContent = fm(jadeContent);
+ const htmlContent = jade.render(fmContent.body);
+ return Object.assign({ path, content: htmlContent }, fmContent.attributes);
};
const router = new Router();