feat(legal): use HTML template at build to ensure an entire HTML document

This commit is contained in:
2026-07-29 22:34:11 +02:00
parent 2204a19841
commit b79d1d3902
+22 -1
View File
@@ -24,7 +24,28 @@ export default async function build () {
const legalNoticeMd = await readFile('./src/legal/legal_notice.md', { encoding: 'utf-8' }); const legalNoticeMd = await readFile('./src/legal/legal_notice.md', { encoding: 'utf-8' });
const legalNoticeHtml = md.render(legalNoticeMd); const legalNoticeHtml = md.render(legalNoticeMd);
const legalNoticeHtmlMinified = await minify(legalNoticeHtml, { const fullLegalNoticeHTML = `
<html lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
Legal Notice
</title>
</head>
<body>
<header>
<h1>
Legal Notice
</h1>
</header>
<main>
${legalNoticeHtml}
</main>
</body>
</html>`;
const legalNoticeHtmlMinified = await minify(fullLegalNoticeHTML, {
collapseWhitespace: true, collapseWhitespace: true,
conservativeCollapse: true, conservativeCollapse: true,
collapseInlineTagWhitespace: true, collapseInlineTagWhitespace: true,