html files for pages

This commit is contained in:
Jan Prochazka
2024-09-03 12:57:52 +02:00
parent 90dfe889f7
commit 3a0a3a2ddb
9 changed files with 41 additions and 36 deletions

View File

@@ -0,0 +1,8 @@
const fs = require('fs');
const template = fs.readFileSync('./index.html.tpl', 'utf-8');
for (const page of ['', 'not-logged', 'error', 'admin-login', 'login', 'admin', 'license']) {
const text = template.replace(/{{page}}/g, page);
fs.writeFileSync(`public/${page || 'index'}.html`, text);
}