mirror of
https://github.com/vinta/awesome-python.git
synced 2026-10-20 18:52:21 +00: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:
parent
c5376618b8
commit
18011f86f3
3 changed files with 30 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue