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

This commit is contained in:
2026-07-29 22:13:19 +02:00
parent 8be1e48615
commit 503a39aa03
+22 -1
View File
@@ -24,7 +24,28 @@ export default async function build () {
const imprintMd = await readFile('./src/legal/imprint.md', { encoding: 'utf-8' }); const imprintMd = await readFile('./src/legal/imprint.md', { encoding: 'utf-8' });
const imprintHtml = md.render(imprintMd); const imprintHtml = md.render(imprintMd);
const imprintHtmlMinified = await minify(imprintHtml, { const fullImprintHTML = `
<html lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
Imprint
</title>
</head>
<body>
<header>
<h1>
Imprint
</h1>
</header>
<main>
${imprintHtml}
</main>
</body>
</html>`;
const imprintHtmlMinified = await minify(fullImprintHTML, {
collapseWhitespace: true, collapseWhitespace: true,
collapseInlineTagWhitespace: true, collapseInlineTagWhitespace: true,
removeComments: true removeComments: true