feat(website): surface subcategory labels as filterable tags

Entries nested under a plain-text subcategory heading (e.g. "Frameworks"
inside Testing) now carry a subcategory field populated by the parser.
The build pipeline collects these into a subcategories list on each merged
entry, and the template renders them as tag-subcat buttons that plug into
the existing data-cats filter mechanism.

A dedicated .tag-subcat style distinguishes them visually from category
tags, and both are hidden on mobile alongside .tag-group.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-03-23 01:04:20 +08:00
parent 1c249d4b5f
commit f2b4a7bc83
4 changed files with 30 additions and 4 deletions
+4
View File
@@ -102,6 +102,9 @@ def extract_entries(
existing["categories"].append(cat["name"])
if group_name not in existing["groups"]:
existing["groups"].append(group_name)
subcat = entry["subcategory"]
if subcat and subcat not in existing["subcategories"]:
existing["subcategories"].append(subcat)
else:
merged = {
"name": entry["name"],
@@ -109,6 +112,7 @@ def extract_entries(
"description": entry["description"],
"categories": [cat["name"]],
"groups": [group_name],
"subcategories": [entry["subcategory"]] if entry["subcategory"] else [],
"stars": None,
"owner": None,
"last_commit_at": None,