Skip to content

Commit

Permalink
faster category collapsing
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Aug 20, 2024
1 parent 7cdc37f commit d8bf060
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .vitepress/computeCategories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ export default function computeCategories(dir: string) {
}, [] as DocCategory[])
.map((category) => {
// collapse categories that are entirely archived/deprecated by default
if (category.items.every((i) => i.deprecated || i.archived))
return { ...category, collapsed: true };
if (category.items.every((i) => i.deprecated || i.archived)) category.collapsed = true;
return category;
})
.sort();
Expand Down

0 comments on commit d8bf060

Please sign in to comment.