generated from Seekra/repository-template
feat(legal): use HTML template at build to ensure an entire HTML document
This commit is contained in:
+22
-1
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user