20 Commits
Author SHA1 Message Date
jakob.scheid 503a39aa03 feat(legal): use HTML template at build to ensure an entire HTML document 2026-07-29 22:13:19 +02:00
jakob.scheid 8be1e48615 feat(legal): minify imprint HTML when building 2026-07-29 22:09:23 +02:00
jakob.scheid ce1f34dd3e chore(dependencies): add html-minifier-terser 2026-07-29 21:57:20 +02:00
jakob.scheid 0b56422985 feat(fonts): add fonts build artifact 2026-07-29 21:52:46 +02:00
jakob.scheid 8e46c41e18 feat(legal): add name to legal build artifact 2026-07-29 21:52:46 +02:00
jakob.scheid 9a76acafc0 feat(build): implement artifact names 2026-07-29 21:52:46 +02:00
jakob.scheid 4062eb4e82 feat(build): implement implicit artifact copy source path 2026-07-29 21:52:45 +02:00
jakob.scheid b74c3aef3a fix(build): add check whether artifact has options 2026-07-29 21:52:45 +02:00
jakob.scheid 4a080ce374 feat(build): make permissions checks less strict 2026-07-29 21:52:45 +02:00
jakob.scheid 60e02ebcf7 feat(build): allow to copy directories recursively 2026-07-29 21:52:44 +02:00
jakob.scheid c44eb2f15c chore(cd)!: update production deployment workflow to use build 2026-07-29 21:52:44 +02:00
jakob.scheid 55e92d31b8 feat(legal): add build plugin for legal assets 2026-07-29 21:52:44 +02:00
jakob.scheid 38c5a70f2a chore(dependencies): add markdown-it 2026-07-29 21:52:06 +02:00
jakob.scheid 11ba5cd6d8 feat(build): implement dist and src paths customization 2026-07-29 21:51:35 +02:00
jakob.scheid 66d5cd34e4 feat(build): implement artifact processor 2026-07-29 21:51:34 +02:00
jakob.scheid 74f9ed2e6a feat(build): add file access utility 2026-07-29 21:51:34 +02:00
jakob.scheid c164a9e1e3 refactor(build): restructure plugin processing 2026-07-29 21:51:34 +02:00
jakob.scheid 2fa67d7930 feat(build): add build script 2026-07-29 21:51:29 +02:00
jakob.scheid 7841ba2723 chore: set up Node.js project 2026-07-29 21:51:28 +02:00
jakob.scheid e4ac9027ee feat(legal): add imprint 2026-07-29 21:51:20 +02:00
2 changed files with 9 additions and 10 deletions
+9 -10
View File
@@ -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'
}
}