summaryrefslogtreecommitdiffstats
path: root/lib/models/page.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models/page.js')
-rw-r--r--lib/models/page.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/models/page.js b/lib/models/page.js
index 3f54f43..43a2c1f 100644
--- a/lib/models/page.js
+++ b/lib/models/page.js
@@ -1,5 +1,5 @@
var Immutable = require('immutable');
-var matter = require('gray-matter');
+var yaml = require('js-yaml');;
var File = require('./file');
@@ -44,7 +44,8 @@ Page.prototype.toText = function() {
return content;
}
- return matter.stringify(content, attrs.toJS());
+ var frontMatter = '---\n' + yaml.safeDump(attrs.toJS(), { skipInvalid: true }) + '---\n';
+ return (frontMatter + content);
};
/**