fix: SEO-Bake idempotent halten
This commit is contained in:
1 parent
1131ca5f81
commit
6dbf5c2fec
29 files changed
+42
-28
No files matched your search
@@ -132,7 +132,7 @@ for (const f of readdirSync(PUB).filter((x) => x.endsWith('.html'))) {
|
||||
html = html.replace('</title>', `</title>\n\t${descriptionTag}`);
|
||||
}
|
||||
}
|
||||
const re = new RegExp(reEsc(BEGIN) + '[\\s\\S]*?' + reEsc(END) + '\\n?');
|
||||
const re = new RegExp('[\\t ]*' + reEsc(BEGIN) + '[\\s\\S]*?' + reEsc(END) + '\\n?');
|
||||
html = html.replace(re, '');
|
||||
if (!html.includes('</head>')) { console.warn('kein </head> in', f); continue; }
|
||||
html = html.replace('</head>', buildBlock(p) + '\n</head>');
|
||||
|
||||
Reference in new issue
Block a user