diff --git a/content/200-orm/500-reference/300-errors/_category_.json b/content/200-orm/500-reference/300-errors/_category_.json index b8c63f665b..98a3c4415c 100644 --- a/content/200-orm/500-reference/300-errors/_category_.json +++ b/content/200-orm/500-reference/300-errors/_category_.json @@ -1,3 +1,5 @@ { - "className": "hidden-sidebar" + "className": "hidden-sidebar", + + "customProps": { "hide_from_subsection": true } } diff --git a/src/theme/DocCardList/index.tsx b/src/theme/DocCardList/index.tsx index 83fad7b2e6..0d2728d749 100644 --- a/src/theme/DocCardList/index.tsx +++ b/src/theme/DocCardList/index.tsx @@ -19,7 +19,11 @@ export default function DocCardList(props: Props): JSX.Element { } const [filteredItems, setFilteredItems] = useState(filterDocCardListItems(items)); useEffect(() => { - setFilteredItems(filteredItems.filter((e: any) => e?.href?.slice(0, -1) !== location.pathname)); + setFilteredItems(prevFilteredItems => + prevFilteredItems + .filter((e: any) => e?.href?.slice(0, -1) !== location.pathname) + .filter((e: any) => !e?.customProps?.hide_from_subsection) + ); }, [items]); return (