diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bb179c8 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +source := content +output := pdf +sources := $(wildcard $(source)/*.md) +objects := $(patsubst %.md,%.pdf,$(subst $(source),$(output),$(sources))) + +all: hugo $(objects) +$(output)/%.pdf: $(source)/%.md + chromium --temp-profile --headless --disable-gpu --run-all-compositor-stages-before-draw --allow-file-access-from-files --allow-running-insecure-content --print-to-pdf-no-header --print-to-pdf="$@" "public/print/$(notdir $(basename $@))/print.html" + +.PHONY : clean hugo + +clean: + rm -rf pdf/ public/ + +hugo: + hugo + mkdir -p pdf diff --git a/content/linsen_mit_spätzle.md b/content/linsen_mit_spätzle.md index 61f588c..d0c0620 100644 --- a/content/linsen_mit_spätzle.md +++ b/content/linsen_mit_spätzle.md @@ -18,7 +18,7 @@ servings: 4 - 15g Mehl - 250g Tellerlinsen - 2 Esslöffel Tomatenmark -- 1–2 Teelöffel getrockneter Majoran +- 1-2 Teelöffel getrockneter Majoran - 1 Lorbeerblatt - 1,2l Gemüse- oder Fleischbrühe - 1-2 Esslöffel Balsamessig diff --git a/make.sh b/make.sh deleted file mode 100755 index e2db900..0000000 --- a/make.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -rm -rf public/ pdf/ -mkdir pdf -hugo -for dir in public/print/* -do - chromium --temp-profile --headless --disable-gpu --run-all-compositor-stages-before-draw --allow-file-access-from-files --allow-running-insecure-content --print-to-pdf-no-header --print-to-pdf="pdf/$(basename $dir).pdf" "${dir}/print.html" -done