cms: hochgeladene Bilder sofort sichtbar (/images aus static/ servieren)

Uploads landen in static/images/, wurden aber erst nach Hugo-Build unter
/images/ ausgeliefert → Vorschau/Cover/Profilbild blieben leer. Jetzt serviert
der Server /images/* direkt aus static/ — sofort sichtbar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 12:55:44 +02:00
parent 47a70ea834
commit 2b682f5149
+4
View File
@@ -47,6 +47,10 @@ app.use(
}), }),
); );
// Hochgeladene Bilder direkt aus static/ servieren — sofort sichtbar
// (Vorschau, Cover, Profilbild), ohne auf den nächsten Hugo-Build zu warten.
app.use('/images/*', serveStatic({ root: `${SITE_DIR}/static` }));
// --- Live-Site (gebaut nach public/) --- // --- Live-Site (gebaut nach public/) ---
app.use('/*', serveStatic({ root: `${SITE_DIR}/public` })); app.use('/*', serveStatic({ root: `${SITE_DIR}/public` }));