mirror of
https://github.com/skoelle/moonweb-site.git
synced 2026-09-17 17:00:25 +00:00
pdf fix
This commit is contained in:
@@ -77,6 +77,7 @@ moonweb-site/
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run prebuild # Pre-Build Tasks (CV PDF generieren)
|
||||
npm run dev:hub # localhost:8081
|
||||
npm run dev:infra # localhost:8082
|
||||
npm run dev:smarthome # localhost:8083
|
||||
@@ -104,6 +105,23 @@ npm run build # Alle Sites bauen
|
||||
- CV-Partial zentral pflegbar (einmal aendern → Web + PDF aktualisieren)
|
||||
- LED Matrix als eigene Seite unter stefankoelle.de/ledmatrix/
|
||||
|
||||
### CV PDF Generierung
|
||||
|
||||
Das CV-PDF wird via WeasyPrint generiert:
|
||||
|
||||
```bash
|
||||
npm run pdf:cv # Einzelnes PDF generieren
|
||||
npm run prebuild # Alle Pre-Build Tasks (inkl. CV PDF)
|
||||
```
|
||||
|
||||
Dateien:
|
||||
- `stefankoelle/pdf/cv-style.css` — WeasyPrint-Stylesheet (A4, Typografie)
|
||||
- `stefankoelle/pdf/build-pdf.sh` — Shell-Skript für PDF-Generierung
|
||||
- `stefankoelle/cv-print.njk` — Standalone HTML-Template (nur CV-Content)
|
||||
- `stefankoelle/pdf/cv.pdf` — Generiertes PDF (Output)
|
||||
|
||||
Wichtig: Das PDF wird via Eleventy-Passthrough ins Build-Output kopiert (`dist/stefankoelle/pdf/cv.pdf`).
|
||||
|
||||
### CSS Cache-Busting
|
||||
|
||||
CSS-Dateien werden als Passthrough kopiert (kein Hash im Dateinamen). Bei CSS-Änderungen muss der Query-String in der `?v=N` Inkludierung erhöht werden:
|
||||
@@ -133,6 +151,5 @@ Benötigte Secrets:
|
||||
## Offene Punkte
|
||||
|
||||
- retro/ ist bewusst rudimentär gehalten
|
||||
- PDF-Build fuer CV (WeasyPrint) — lokal testen, spaeter in CI integrieren
|
||||
- Querverlinkungen stefankoelle.de <-> smarthome (zukuenftig)
|
||||
- Ledmatrix ggf. nach smarthome verschieben (when ready)
|
||||
|
||||
@@ -100,8 +100,9 @@ Each site has its own minimal Eleventy config (`<site>/eleventy.config.js`). Liv
|
||||
### Build
|
||||
|
||||
```bash
|
||||
npm run build # builds all 5 → dist/<site>/
|
||||
npm run build:hub # build single site
|
||||
npm run prebuild # pre-build tasks (CV PDF)
|
||||
npm run build # builds all 5 → dist/<site>/
|
||||
npm run build:hub # build single site
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
+2
-1
@@ -18,7 +18,8 @@
|
||||
"build:retro": "npx @11ty/eleventy --config=retro/eleventy.config.js",
|
||||
"build:stefankoelle": "npx @11ty/eleventy --config=stefankoelle/eleventy.config.js",
|
||||
"build": "npm run build:hub && npm run build:infra && npm run build:smarthome && npm run build:code && npm run build:retro && npm run build:stefankoelle",
|
||||
"pdf:cv": "bash stefankoelle/pdf/build-pdf.sh"
|
||||
"pdf:cv": "bash stefankoelle/pdf/build-pdf.sh",
|
||||
"prebuild": "bash prebuild.sh"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy": "^3.1.6"
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "==> Running prebuild tasks..."
|
||||
|
||||
echo ""
|
||||
echo "--- CV PDF ---"
|
||||
bash stefankoelle/pdf/build-pdf.sh
|
||||
|
||||
echo ""
|
||||
echo "==> Prebuild complete."
|
||||
@@ -24,7 +24,7 @@
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" href="/assets/ms-icon-144x144.png">
|
||||
<link rel="stylesheet" href="/assets/style.css">
|
||||
<link rel="stylesheet" href="/assets/style.css?v=3">
|
||||
</head>
|
||||
<body class="blog">
|
||||
<div id="container">
|
||||
|
||||
@@ -10,7 +10,7 @@ description: "WiFi-controlled LED display solution with REST API, DHT22 sensor,
|
||||
<meta name="description" content="{{ description }}">
|
||||
<meta name="author" content="Stefan Kölle">
|
||||
<title>{{ title }} - ESP32 Project</title>
|
||||
<link rel="stylesheet" href="assets/style.css?v=2">
|
||||
<link rel="stylesheet" href="assets/style.css?v=3">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user