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 () {
|
export default async function build () {
|
||||||
const md = MarkdownIt();
|
const md = MarkdownIt();
|
||||||
|
|
||||||
const imprintMd = await readFile('./src/legal/imprint.md', { encoding: 'utf-8' });
|
const legalNoticeMd = await readFile('./src/legal/legal_notice.md', { encoding: 'utf-8' });
|
||||||
const imprintHtml = md.render(imprintMd);
|
const legalNoticeHtml = md.render(legalNoticeMd);
|
||||||
|
|
||||||
const fullImprintHTML = `
|
const fullLegalNoticeHTML = `
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>
|
<title>
|
||||||
Imprint
|
Legal Notice
|
||||||
</title>
|
</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1>
|
<h1>
|
||||||
Imprint
|
Legal Notice
|
||||||
</h1>
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
${imprintHtml}
|
${legalNoticeHtml}
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>`;
|
</html>`;
|
||||||
|
|
||||||
const imprintHtmlMinified = await minify(fullImprintHTML, {
|
const legalNoticeHtmlMinified = await minify(fullLegalNoticeHTML, {
|
||||||
collapseWhitespace: true,
|
collapseWhitespace: true,
|
||||||
|
conservativeCollapse: true,
|
||||||
collapseInlineTagWhitespace: true,
|
collapseInlineTagWhitespace: true,
|
||||||
removeComments: true
|
removeComments: true
|
||||||
});
|
});
|
||||||
@@ -55,10 +56,10 @@ export default async function build () {
|
|||||||
artifacts: [
|
artifacts: [
|
||||||
{
|
{
|
||||||
name: 'legal',
|
name: 'legal',
|
||||||
path: 'legal/imprint.html',
|
path: 'legal/legal_notice.html',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
options: {
|
options: {
|
||||||
content: imprintHtmlMinified,
|
content: legalNoticeHtmlMinified,
|
||||||
encoding: 'utf-8'
|
encoding: 'utf-8'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user