From 324991d82ef26798ed5842a6fe03eabc798ff497 Mon Sep 17 00:00:00 2001 From: la-ninpre Date: Thu, 27 May 2021 00:13:05 +0300 Subject: modify art page to display thumbnails thumbnails are currently created using shell script and require imagemagick installed on the server. i know it's stupid, but i think that including thumbnails to repo is also stupid. maybe later i replace this script with actual jekyll plugin, but for this i'll need to familiarize myself with ruby. but now i use following addition to the git hook on the server: ``` [ -f "$TMP_GIT_CLONE/art/thumbs.sh" ] && { dir="$PWD" cd "$TMP_GIT_CLONE/art/" && sh thumbs.sh && cd "$dir" } ``` it happens after cloning to remote repo and before building with bundle. overall, this is a bodge now, it recompiles all thumbnails every time due to quirks in my current setup. --- .gitignore | 1 + _config.yml | 7 ++++++ _includes/art-menu.html | 4 ++-- _includes/pic-path.html | 20 +++++++++++++++- _layouts/about-page.html | 3 ++- _layouts/art-category.html | 16 +++++++++---- _sass/main.scss | 1 + art/photos/pyramid.jpg | Bin 2578973 -> 2628562 bytes art/thumbs.sh | 56 +++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 100 insertions(+), 8 deletions(-) create mode 100755 art/thumbs.sh diff --git a/.gitignore b/.gitignore index a0ac718..d50e8d5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ _site/ .jekyll-metadata .sass-cache/ Gemfile.lock +art/*/thumbs/ diff --git a/_config.yml b/_config.yml index a74072f..1f827a6 100644 --- a/_config.yml +++ b/_config.yml @@ -7,6 +7,7 @@ plugins: exclude: - LICENSE - README.md + - art/thumbs.sh excerpt_separator: @@ -30,3 +31,9 @@ defaults: path: "art" values: art: true + + - scope: + path: "art/*/thumbs" + values: + thumbnail: true + diff --git a/_includes/art-menu.html b/_includes/art-menu.html index d74d9da..0d35b96 100644 --- a/_includes/art-menu.html +++ b/_includes/art-menu.html @@ -1,12 +1,12 @@