website/Tuprules.tup

26 lines
868 B
Plaintext
Raw Normal View History

2019-06-10 21:51:04 +02:00
&root = .
2021-08-31 13:58:44 +02:00
&build_root = build
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
2019-10-29 12:53:51 +01:00
!html = | &(root)/templates/footer.html \
2021-08-31 13:58:44 +02:00
|> ^b html %f^ \
2019-10-29 12:53:51 +01:00
pandoc --from markdown --to html \
--template=&(root)/templates/$(HTML_TEMPLATE) \
2019-06-19 13:58:22 +02:00
--css &(root)/css/style.css \
--include-in-header=&(root)/templates/header.html \
--include-before-body=&(root)/templates/nav.html \
2021-08-31 13:58:44 +02:00
--include-after-body=&(build_root)/templates/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 |>