const path = require('path'); const fs = require('fs'); // Fetch the posthtml template and convert it to an ejs template const main = () => { const buildDir = path.join(__dirname, '..', '..', '..', 'build'); let template = fs.readFileSync(path.join(buildDir, 'base.html'), 'utf8'); template = template.replace('', 'NGINXConfig | '); template = template.replace('', ''); template = template.replace('', '
'); fs.writeFileSync(path.join(buildDir, 'index.html'), template); }; main();