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.

18 lines
525 B

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