Wrap doc site in raw tags.

This commit is contained in:
John-David Dalton
2016-08-07 13:55:38 -07:00
parent f9a4705c9c
commit 71be34859f

View File

@@ -11,9 +11,10 @@ var basePath = path.join(__dirname, '..', '..'),
readmePath = path.join(docPath, 'README.md');
function build(type) {
// Load markdown and uncomment docdown HTML hints.
var markdown = fs
// Load markdown.
.readFileSync(readmePath, 'utf8')
// Uncomment docdown HTML hints.
.replace(/(<)!--\s*|\s*--(>)/g, '$1$2');
var $ = marky(markdown, { 'sanitize': false }),
@@ -45,8 +46,8 @@ function build(type) {
}
});
// Append YAML front matter.
var html = [
// Append YAML front matter.
'---',
'id: docs',
'layout: docs',
@@ -54,7 +55,10 @@ function build(type) {
'version: ' + (version || null),
'---',
'',
// Wrap in raw tags to avoid Liquid template tag processing.
'{% raw %}',
_.trim($.html()),
'{% endraw %}'
].join('\n');
fs.writeFile(path.join(docPath, version + '.html'), html, util.pitch);