X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/db7b464d701c7d48777ddd38a10f69093cd5442c..a9c02cac1fde01ac28dc1241d1e63f85a1ff03a2:/lib/generators/html.js?ds=sidebyside diff --git a/lib/generators/html.js b/lib/generators/html.js index ba2676c..9579cb2 100644 --- a/lib/generators/html.js +++ b/lib/generators/html.js @@ -1,6 +1,6 @@ 'use strict'; -const { template } = require('dot'); +const { template, templateSettings } = require('dot'); const { readFile, writeFile } = require('fs/promises'); const { join } = require('path'); const { debuglog } = require('util'); @@ -29,7 +29,10 @@ module.exports = async function HTMLGenerator(source, target, posts) { const indexTemplate = await readFile(indexLocation, { encoding: 'utf8' }); internals.debuglog('Writing HTML'); - const indexHtml = template(indexTemplate)({ posts }); + const indexHtml = template(indexTemplate, { + ...templateSettings, + strip: false + })({ posts }); await writeFile(indexTarget, indexHtml); };