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

This commit is contained in:
2026-08-01 13:48:29 +02:00
committed by jakob.scheid
parent 873a0514c9
commit 018b3e5efd
+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 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,
conservativeCollapse: true,
collapseInlineTagWhitespace: true,