generated from Seekra/repository-template
Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
503a39aa03
|
||
|
|
8be1e48615
|
||
|
|
ce1f34dd3e
|
||
|
|
0b56422985
|
||
|
|
8e46c41e18
|
||
|
|
9a76acafc0
|
||
|
|
4062eb4e82
|
||
|
|
b74c3aef3a
|
||
|
|
4a080ce374
|
||
|
|
60e02ebcf7
|
||
|
|
c44eb2f15c
|
||
|
|
55e92d31b8
|
||
|
|
38c5a70f2a
|
||
|
|
11ba5cd6d8
|
||
|
|
66d5cd34e4
|
||
|
|
74f9ed2e6a
|
||
|
|
c164a9e1e3
|
||
|
|
2fa67d7930
|
||
|
|
7841ba2723
|
||
|
|
e4ac9027ee
|
+9
-10
@@ -21,33 +21,32 @@ import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
||||
export default async function build () {
|
||||
const md = MarkdownIt();
|
||||
|
||||
const legalNoticeMd = await readFile('./src/legal/legal_notice.md', { encoding: 'utf-8' });
|
||||
const legalNoticeHtml = md.render(legalNoticeMd);
|
||||
const imprintMd = await readFile('./src/legal/imprint.md', { encoding: 'utf-8' });
|
||||
const imprintHtml = md.render(imprintMd);
|
||||
|
||||
const fullLegalNoticeHTML = `
|
||||
const fullImprintHTML = `
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>
|
||||
Legal Notice
|
||||
Imprint
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>
|
||||
Legal Notice
|
||||
Imprint
|
||||
</h1>
|
||||
</header>
|
||||
<main>
|
||||
${legalNoticeHtml}
|
||||
${imprintHtml}
|
||||
</main>
|
||||
</body>
|
||||
</html>`;
|
||||
|
||||
const legalNoticeHtmlMinified = await minify(fullLegalNoticeHTML, {
|
||||
const imprintHtmlMinified = await minify(fullImprintHTML, {
|
||||
collapseWhitespace: true,
|
||||
conservativeCollapse: true,
|
||||
collapseInlineTagWhitespace: true,
|
||||
removeComments: true
|
||||
});
|
||||
@@ -56,10 +55,10 @@ export default async function build () {
|
||||
artifacts: [
|
||||
{
|
||||
name: 'legal',
|
||||
path: 'legal/legal_notice.html',
|
||||
path: 'legal/imprint.html',
|
||||
type: 'text',
|
||||
options: {
|
||||
content: legalNoticeHtmlMinified,
|
||||
content: imprintHtmlMinified,
|
||||
encoding: 'utf-8'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user