You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
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 deploy
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
rm -rf pdf/ public/
|
|
|
|
|
|
|
|
|
|
hugo:
|
|
|
|
|
hugo
|
|
|
|
|
mkdir -p pdf
|
|
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
|
rsync -aP public/ dario@ghostdub.de:~/www-data/rezepte/
|
|
|
|
|
rsync -aP pdf/*.pdf dario@ghostdub.de:~/www-data/rezepte/print/
|