mirror of
https://github.com/vinta/awesome-python.git
synced 2026-05-21 13:28:31 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user