Git for the orangehattech website https://orangehattech.com
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.

Tupfile 1.1KB

123456789101112131415161718192021222324252627
  1. #Figure out newest article
  2. #: |> cp src/news/`ls src/news -t | head -1` %o; |> obj/news.md
  3. #Cmark all the .md
  4. : foreach src/*.md |> cmark %f > %o |> obj/cmark/%B.html
  5. #minify all html
  6. : foreach src/theme/*.html |> minify %f > %o |> obj/theme/%B.html
  7. : foreach obj/cmark/*.html |> minify %f > %o |> obj/min/%B.html
  8. #Concat all webpages
  9. : foreach obj/min/*.html | obj/theme/*.html |> cat obj/theme/header.html %f obj/theme/footer.html > %o |> web/%B.html
  10. #Scour and output svg
  11. #: foreach src/svg/* |> scour3 --shorten-ids --set-precision=1 --no-line-breaks --strip-xml-space --enable-viewboxing --enable-comment-stripping --remove-descriptive-elements --strip-xml-prolog --indent=none %f %o |> web/%b
  12. #Hi! My name is svgcleaner. I eat SVGs. No idea why.
  13. #: foreach src/svg/* |> svgcleaner %f %o |> web/%b
  14. #Minify css
  15. : src/theme/*.css |> minify %f > %o |> web/%b
  16. #Move all our unchanged stuff to the final output dir
  17. : foreach src/img/ico/*.ico src/*.php obj/theme/*.html |> cp %f %o |> web/%b
  18. : foreach src/dep/*.php |> cp %f %o |> web/dep/%b
  19. #Brotli compression
  20. : foreach web/*.html web/*.svg web/*.css |> brotli %f -o %o |> web/%b.br