'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');
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);
};