From d385f289146227697fa07fe68292595b8e578e7f Mon Sep 17 00:00:00 2001 From: Marie Katrine Ekeberg Date: Sun, 4 Aug 2024 17:42:43 +0200 Subject: [PATCH] Experiment with an html minifier to make site smaller --- .github/workflows/jekyll.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 29c8da5..0dc57a2 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -42,6 +42,11 @@ jobs: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" env: JEKYLL_ENV: production + - name: Minify HTML to make the site as small as possible + if: github.event_name != 'pull_request' + run: | + npm install html-minifier + html-minifier --collapse-whitespace --minify-js --minify-css --remove-comments --file-ext html --input-dir _site --output-dir _site - name: Upload artifact if: github.event_name != 'pull_request' uses: actions/upload-pages-artifact@v3