My photo gallery powered by img-DB
My photo gallery from /photos/ is now powered by img-DB.
It’s a bit of a hackery fuckery, but it works.
I had to implement loading external data from a YAML file, to match with the imported images.
Also I had to implement adding and removing attrs from images before injecting them in the gallery.
I also made a special template that I commited: https://github.com/croqaz/img-db/blob/5707376e6a79b4bfb78210dd5c90154987867b41/imgdb/tmpl/crlf_gallery.html to generate a Markdown file that I now use with 11ty.
These are the commands I’m using:
# import my image collection imgdb add ~/org/public/img/photos/ --operation '' --workers 12 --dbname ~/org/public/img-photos-db.htm --thumb-sz 128 --v-hashes '*' --data-from ~/org/public/img/photos.yml # generate the gallery in the correct folder imgdb gallery /tmp/crlf_photos.md --tmpl crlf_gallery.html --dbname ~/org/public/img-photos-db.htm --del-attrs 'data-pth' --add-attrs 'class=rounded' # move generated gallery in Cr;Lf; folder mv /tmp/crlf_photos-01.md ~/Dev/crlf/log/photos/index.md
So yes, it finally happened! I have all the features I need and more.