From 136bbc2f159103084a9b1c95d40d2d7f79c5495c Mon Sep 17 00:00:00 2001 From: StuckDuck Date: Sat, 17 Aug 2024 07:47:52 +0000 Subject: [PATCH] fix thumbnails 4 --- .github/workflows/pages-upload.yml | 7 +++---- _config.yml | 9 ++++++++- gallery.markdown | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pages-upload.yml b/.github/workflows/pages-upload.yml index cdfe388..d1dcc5c 100644 --- a/.github/workflows/pages-upload.yml +++ b/.github/workflows/pages-upload.yml @@ -18,9 +18,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Install SSG - run: sudo apt-get install ruby jekyll + run: sudo apt-get install ruby jekyll ruby-jekyll-feed - name: Install exiftool run: sudo apt-get install exiftool ruby-mini-exiftool webp + - name: Install plugins + run: sudo gem install jekyll-webp jekyll-redirect-from - name: Setup Pages id: pages uses: actions/configure-pages@v5 @@ -34,9 +36,6 @@ jobs: run: jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" env: JEKYLL_ENV: production - - name: Create compressed versions of each photo - working-directory: './photos' - run: find . -type f -not -path "./.git/*" | parallel -eta cwebp "{}" -o "_site/photos/{.}.webp" -size 524288 -mt || true - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/_config.yml b/_config.yml index 1d67fab..69a7b2b 100755 --- a/_config.yml +++ b/_config.yml @@ -23,4 +23,11 @@ defaults: values: noheader: true -include: ["_*.JPG", "_*.jpg"] +include: ["_*.JPG", "_*.jpg", "_*.webp"] +webp: + enabled: true + quality: 90 + img_dir: ["/photos"] + nested: true + formats: [".JPG", ".jpg", ".jpeg"] + append_ext: true \ No newline at end of file diff --git a/gallery.markdown b/gallery.markdown index 8af4863..e2ca60e 100755 --- a/gallery.markdown +++ b/gallery.markdown @@ -24,7 +24,7 @@ permalink: /gallery
    {% for photo in photos %}
  1. - {{ photo.title }} + {{ photo.title }}