added engine seperation from posts and entrypoint for compose building

This commit is contained in:
venus
2026-09-13 21:12:06 -05:00
parent 04a39ca852
commit 42e7e0f1ff
5 changed files with 84 additions and 23 deletions
Executable
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
# Pass-through mode: if arguments were provided, execute them directly
if [ "$#" -gt 0 ]; then
exec "$@"
fi
# Build static site from mounted or packaged markdown posts
echo "[blog-engine] Compiling static site with Eleventy..."
npm run build || exit 1
# Optional watch mode for zero-restart live note updates
if [ "${WATCH:-false}" = "true" ]; then
echo "[blog-engine] Starting live watch daemon for markdown changes..."
npx @11ty/eleventy --watch &
fi
# Start production static web server
echo "[blog-engine] Starting static server on port ${PORT:-8080}..."
exec node server.js