generated from Seekra/repository-template
Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b79d1d3902
|
||
|
|
2204a19841
|
||
|
|
a5076b3ace
|
||
|
|
aeb9f8d549
|
||
|
|
21c75c4663
|
||
|
|
4a3010b683
|
||
|
|
55599bd0a2
|
||
|
|
73101f8716
|
||
|
|
4c016bbc38
|
||
|
|
100adb40e9
|
||
|
|
c4ac9f43b3
|
||
|
|
89c82f3fd7
|
||
|
|
fb64936888
|
||
|
|
91c86b06a7
|
||
|
|
5c1c5fcf55
|
||
|
|
da6dfe8091
|
||
|
|
f977293dd9
|
||
|
|
f0fcfa43b9
|
||
|
|
47282bdc2f
|
||
|
|
a73c044e46
|
+10
-9
@@ -21,32 +21,33 @@ import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
||||
export default async function build () {
|
||||
const md = MarkdownIt();
|
||||
|
||||
const imprintMd = await readFile('./src/legal/imprint.md', { encoding: 'utf-8' });
|
||||
const imprintHtml = md.render(imprintMd);
|
||||
const legalNoticeMd = await readFile('./src/legal/legal_notice.md', { encoding: 'utf-8' });
|
||||
const legalNoticeHtml = md.render(legalNoticeMd);
|
||||
|
||||
const fullImprintHTML = `
|
||||
const fullLegalNoticeHTML = `
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>
|
||||
Imprint
|
||||
Legal Notice
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>
|
||||
Imprint
|
||||
Legal Notice
|
||||
</h1>
|
||||
</header>
|
||||
<main>
|
||||
${imprintHtml}
|
||||
${legalNoticeHtml}
|
||||
</main>
|
||||
</body>
|
||||
</html>`;
|
||||
|
||||
const imprintHtmlMinified = await minify(fullImprintHTML, {
|
||||
const legalNoticeHtmlMinified = await minify(fullLegalNoticeHTML, {
|
||||
collapseWhitespace: true,
|
||||
conservativeCollapse: true,
|
||||
collapseInlineTagWhitespace: true,
|
||||
removeComments: true
|
||||
});
|
||||
@@ -55,10 +56,10 @@ export default async function build () {
|
||||
artifacts: [
|
||||
{
|
||||
name: 'legal',
|
||||
path: 'legal/imprint.html',
|
||||
path: 'legal/legal_notice.html',
|
||||
type: 'text',
|
||||
options: {
|
||||
content: imprintHtmlMinified,
|
||||
content: legalNoticeHtmlMinified,
|
||||
encoding: 'utf-8'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user