mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Wrap doc site in raw tags.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user