2019-06-10 21:51:04 +02:00
|
|
|
&root = .
|
2024-11-21 16:26:54 +01:00
|
|
|
&tmpl_dir = ./templates
|
|
|
|
&gen_tmpl_dir = ./build/templates
|
2019-06-14 13:53:29 +02:00
|
|
|
|
2019-10-29 12:53:51 +01:00
|
|
|
HTML_TEMPLATE = main.html
|
2019-06-19 13:58:22 +02:00
|
|
|
|
2024-11-21 16:26:54 +01:00
|
|
|
!html = | &(tmpl_dir)/<tmpl_group> \
|
2021-08-31 13:58:44 +02:00
|
|
|
|> ^b html %f^ \
|
2019-10-29 12:53:51 +01:00
|
|
|
pandoc --from markdown --to html \
|
2024-11-21 16:26:54 +01:00
|
|
|
--template=&(tmpl_dir)/$(HTML_TEMPLATE) \
|
|
|
|
--include-in-header=&(tmpl_dir)/header.html \
|
|
|
|
--include-before-body=&(tmpl_dir)/nav.html \
|
2019-06-19 13:58:22 +02:00
|
|
|
--css &(root)/css/style.css \
|
2024-11-21 16:26:54 +01:00
|
|
|
--include-after-body=&(gen_tmpl_dir)/footer.html \
|
2019-06-19 13:58:22 +02:00
|
|
|
%f | sed 's|%%webRoot%%|&(root)|g' > %o \
|
|
|
|
|> %B.html
|
2019-10-29 13:32:03 +01:00
|
|
|
|
2019-10-29 23:56:37 +01:00
|
|
|
# Images
|
|
|
|
!png = |> convert %f %o |> %B.png
|
2019-10-29 13:32:03 +01:00
|
|
|
!compress_png = |> zopflipng %f %o |>
|
|
|
|
!compress_jpg = |> cjpeg -quality 80 -progressive -outfile %o %f |>
|
2019-11-01 16:30:52 +01:00
|
|
|
!compress_pdf = |> ps2pdf %f %o |>
|
2019-10-29 23:56:37 +01:00
|
|
|
|
|
|
|
JPG_OPT = -quality 80 -strip -interlace Plane
|
2021-08-31 13:58:44 +02:00
|
|
|
!blur_mini = |> ^ %f -> blur mini^ convert %f -resize 400x400 -blur 0x8 $(JPG_OPT) %o |> blur_mini.jpg
|
|
|
|
!thumbnail = |> ^ %f -> thumbnail^ convert %f -resize 200x200 $(JPG_OPT) %o |>
|
2024-11-26 14:38:41 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Slides
|
|
|
|
#
|
|
|
|
MARP = npx @marp-team/marp-cli@latest
|
|
|
|
MARP_OPTS = --allow-local-files --bespoke.progress
|
|
|
|
!marp_pdf = |> $(MARP) $(MARP_OPTS) %f --pdf --output %o |> %B.pdf
|
|
|
|
!marp_html = |> $(MARP) $(MARP_OPTS) %f --html --output %o |> %B.html
|