2023-03-25 12:43:23 +02:00
|
|
|
#!/usr/bin/env bash
|
2022-04-12 09:54:44 +03:00
|
|
|
set -xeuo pipefail
|
2023-03-25 12:43:23 +02:00
|
|
|
cd "$(git rev-parse --show-toplevel)"
|
2022-04-12 09:54:44 +03:00
|
|
|
|
2023-12-07 14:26:12 +02:00
|
|
|
hugo --cleanDestinationDir --printPathWarnings --panicOnWarning
|
2022-04-12 09:54:44 +03:00
|
|
|
|
2024-01-17 09:06:20 +02:00
|
|
|
find public \
|
2022-04-12 09:54:44 +03:00
|
|
|
-name '*.html' -or \
|
|
|
|
-name '*.xml' -or \
|
|
|
|
-name '*.txt' -or \
|
|
|
|
-name '*.css' -or \
|
2023-07-25 10:50:21 +03:00
|
|
|
-name '*.map' -or \
|
2024-01-17 09:06:20 +02:00
|
|
|
-name '*.pdf' | \
|
2024-01-19 13:24:39 +02:00
|
|
|
tee >(xargs -n1 -P$(nproc) zopfli) | \
|
2024-08-24 18:48:17 +03:00
|
|
|
tee >(xargs -n1 -P$(nproc) zstd -19) | \
|
2024-01-19 13:24:39 +02:00
|
|
|
xargs -n1 -P$(nproc) brotli
|