Skip to content

Commit

Permalink
Use html-minifier
Browse files Browse the repository at this point in the history
  • Loading branch information
wintermeyer committed Sep 25, 2023
1 parent 6024edd commit b2138c9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/antora_build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ jobs:
sed -i "/antora-assets\/css\/site-extra.css/d" "$file"
done
- name: Install html-minifier
run: |
npm install -g html-minifier
- name: Minify HTML files
run: |
find ./build/site/ -name "*.html" | while read -r file; do
html-minifier --input "$file" --output "$file" --collapse-whitespace --remove-comments --minify-js --minify-css
done
- name: Zopfli compress all HTML and CSS files
run: |
find ./build/site/ \( -name "*.html" -o -name "*.css" \) -exec zopfli {} \;
Expand Down

0 comments on commit b2138c9

Please sign in to comment.