feat: merge duplicate entries across multiple categories

Entries appearing in more than one category were previously emitted as
separate rows. They are now deduplicated in build.py by URL, collecting
all category and group names into lists.

The template encodes those lists as pipe-delimited data attributes
(data-cats, data-groups) and renders a tag button per category.
The JS filter is updated to split on '||' and check for membership,
so clicking any category tag correctly shows the merged row.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-03-20 17:02:22 +08:00
parent c5376618b8
commit 18011f86f3
3 changed files with 30 additions and 14 deletions
+2 -1
View File
@@ -59,7 +59,8 @@ function applyFilters() {
// Category/group filter
if (activeFilter) {
show = row.dataset[activeFilter.type] === activeFilter.value;
var attr = activeFilter.type === 'cat' ? row.dataset.cats : row.dataset.groups;
show = attr ? attr.split('||').indexOf(activeFilter.value) !== -1 : false;
}
// Text search