My public website https://www.chameth.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.

minify.sh 428B

1234567891011121314
  1. #!/bin/bash
  2. set -uxeo pipefail
  3. # Run tidy over all HTML
  4. for file in $(find /tmp/site/ -name '*.html'); do
  5. # Tidy exits if there are warnings, which there probably will be...
  6. tidy -q -i -w 120 -m --vertical-space yes --drop-empty-elements no "$file" || true
  7. done
  8. # Convert all images to WebP
  9. for file in $(find /tmp/site -name '*.jpg' -o -name '*.png' -o -name '*.jpeg'); do
  10. cwebp -m 6 -mt -o "$file.webp" -- "$file"
  11. done