From a571878b38ef3783a11325f8cd0fd481a9b553a4 Mon Sep 17 00:00:00 2001 From: mnyrop Date: Wed, 19 Jul 2023 13:36:16 -0400 Subject: [PATCH 1/3] better id creation for galleries --- _includes/collection_gallery.html | 57 ++++++++++++++++++------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/_includes/collection_gallery.html b/_includes/collection_gallery.html index 8d41654a2..7e7d56874 100644 --- a/_includes/collection_gallery.html +++ b/_includes/collection_gallery.html @@ -1,42 +1,53 @@ {% assign collection = site[include.collection] %} {% assign undefined = include.undefined | default: 'undefined' %} +{% assign id = include.id | default: include | jsonify | slugify %} -{% if include.only and include.facet_by %} +{% if include.only.size > 0 %} {% assign subset = collection | where: include.facet_by, include.only | sort: 'order' %} +{% else %} + {% assign subset = nil %} {% endif %} -