20 Commits
Author SHA1 Message Date
jakob.scheid b79d1d3902 feat(legal): use HTML template at build to ensure an entire HTML document 2026-07-29 22:34:11 +02:00
jakob.scheid 2204a19841 feat(legal): minify imprint HTML when building 2026-07-29 22:34:04 +02:00
jakob.scheid a5076b3ace chore(dependencies): add html-minifier-terser 2026-07-29 22:27:48 +02:00
jakob.scheid aeb9f8d549 feat(fonts): add fonts build artifact 2026-07-29 22:27:48 +02:00
jakob.scheid 21c75c4663 feat(legal): add name to legal build artifact 2026-07-29 22:27:46 +02:00
jakob.scheid 4a3010b683 feat(build): implement artifact names 2026-07-29 22:27:05 +02:00
jakob.scheid 55599bd0a2 feat(build): implement implicit artifact copy source path 2026-07-29 22:27:04 +02:00
jakob.scheid 73101f8716 fix(build): add check whether artifact has options 2026-07-29 22:27:04 +02:00
jakob.scheid 4c016bbc38 feat(build): make permissions checks less strict 2026-07-29 22:27:03 +02:00
jakob.scheid 100adb40e9 feat(build): allow to copy directories recursively 2026-07-29 22:27:03 +02:00
jakob.scheid c4ac9f43b3 chore(cd)!: update production deployment workflow to use build 2026-07-29 22:27:03 +02:00
jakob.scheid 89c82f3fd7 feat(legal): add build plugin for legal assets 2026-07-29 22:26:57 +02:00
jakob.scheid fb64936888 chore(dependencies): add markdown-it 2026-07-29 22:25:12 +02:00
jakob.scheid 91c86b06a7 feat(build): implement dist and src paths customization 2026-07-29 22:25:12 +02:00
jakob.scheid 5c1c5fcf55 feat(build): implement artifact processor 2026-07-29 22:25:12 +02:00
jakob.scheid da6dfe8091 feat(build): add file accessing utility 2026-07-29 22:25:07 +02:00
jakob.scheid f977293dd9 refactor(build): restructure plugin processing 2026-07-29 22:24:43 +02:00
jakob.scheid f0fcfa43b9 feat(build): add build script 2026-07-29 22:24:43 +02:00
jakob.scheid 47282bdc2f chore: set up Node.js project 2026-07-29 22:24:42 +02:00
jakob.scheid a73c044e46 feat(legal): add legal notice 2026-07-29 22:24:29 +02:00
2 changed files with 10 additions and 9 deletions
+10 -9
View File
@@ -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'
} }
} }