From 71be34859fee146ca8f45641ab03b908a6e83670 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 7 Aug 2016 13:55:38 -0700 Subject: [PATCH] Wrap doc site in raw tags. --- lib/main/build-site.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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);