aboutsummaryrefslogtreecommitdiff
path: root/bin/build
diff options
context:
space:
mode:
authorJoris2022-07-10 14:17:39 +0200
committerJoris2022-07-10 14:31:36 +0200
commitc1e387f2f84014cc7872b5cfcc5865fd2db2b968 (patch)
tree3f3fcb2fb288644d34703504bb22c3ae3b5e2387 /bin/build
parent0a9981f655c99833f247e49699ff480aecc4c5be (diff)
downloadcooking-c1e387f2f84014cc7872b5cfcc5865fd2db2b968.tar.gz
cooking-c1e387f2f84014cc7872b5cfcc5865fd2db2b968.tar.bz2
cooking-c1e387f2f84014cc7872b5cfcc5865fd2db2b968.zip
Write recipes in markdown and transform with pandoc
Diffstat (limited to 'bin/build')
-rwxr-xr-xbin/build15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/build b/bin/build
new file mode 100755
index 0000000..ab6db24
--- /dev/null
+++ b/bin/build
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+set -euo pipefail
+cd "$(dirname "$0")/.."
+
+echo "Building HTML files…"
+
+for RECIPE in recettes/**/*.md; do
+
+ OUT="public/${RECIPE%.md}.html"
+ mkdir -p "$(dirname "$OUT")"
+ pandoc "$RECIPE" --template=template.html -o "$OUT"
+
+done
+
+echo "Done!"