&root = .
HTML_TEMPLATE = main.html
!html = | &(root)/templates/footer.html \
|> ^ html %f^ \
pandoc --from markdown --to html \
--template=&(root)/templates/$(HTML_TEMPLATE) \
--css &(root)/css/style.css \
--include-in-header=&(root)/templates/header.html \
--include-before-body=&(root)/templates/nav.html \
--include-after-body=&(root)/templates/footer.html \
%f | sed 's|%%webRoot%%|&(root)|g' > %o \
|> %B.html
# Images
!png = |> convert %f %o |> %B.png
!compress_png = |> zopflipng %f %o |>
!compress_jpg = |> cjpeg -quality 80 -progressive -outfile %o %f |>
JPG_OPT = -quality 80 -strip -interlace Plane
!blur_mini = |> convert %f -resize 400x400 -blur 0x8 $(JPG_OPT) %o |> blur_mini.jpg
!thumbnail = |> convert %f -resize 200x200 $(JPG_OPT) %o |>