From 2058e9667186e4bb8210aa14dd936405666c8cb8 Mon Sep 17 00:00:00 2001 From: fkakatie Date: Fri, 10 Jul 2026 14:20:32 -0600 Subject: [PATCH 1/2] feat: exclude current path from card list --- widgets/card-list/card-list.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/widgets/card-list/card-list.js b/widgets/card-list/card-list.js index 31d96dc..0e8d81a 100644 --- a/widgets/card-list/card-list.js +++ b/widgets/card-list/card-list.js @@ -21,8 +21,12 @@ export default async function decorate(widget) { const showDescription = widget.dataset.description !== 'false'; const parentPath = resolveRoot(rootParam, lang); + const currentPath = window.location.pathname; const index = await loadIndex(lang); - const children = index.filter((item) => isDirectChild(item.path || item.url || '', parentPath)); + const children = index.filter((item) => { + const itemPath = item.path || item.url || ''; + return isDirectChild(itemPath, parentPath) && itemPath !== currentPath; + }); if (children.length === 0) return; From 5b7cf0f0537bf1e99252612959c2aa1b8e4247dc Mon Sep 17 00:00:00 2001 From: fkakatie Date: Fri, 10 Jul 2026 14:20:49 -0600 Subject: [PATCH 2/2] chore: lint --- widgets/card-list/card-list.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/card-list/card-list.css b/widgets/card-list/card-list.css index 89d6f4c..9fb324d 100644 --- a/widgets/card-list/card-list.css +++ b/widgets/card-list/card-list.css @@ -1,3 +1,3 @@ .card-list { - display: block; -} \ No newline at end of file + display: block; +}