diff --git a/lib/main/build-site.js b/lib/main/build-site.js index e2bf63665..ffa9d03cc 100644 --- a/lib/main/build-site.js +++ b/lib/main/build-site.js @@ -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);