Function: useCategories()
useCategories(
category
?,posts
?):ComputedRef
<CategoryList
>
get categories from posts category: A/B/C { name: 'A', total: 1, children: [ { name: 'B' total: 1, children: [{ name: 'C', total: 1, children: [{ title: '' }] }] } ] }
Parameters
• category?: MaybeRef
<string
>
• posts?: Partial
<PostFrontMatter
>[] = []
Returns
ComputedRef
<CategoryList
>