Skip to content

Function: usePostCollections() ​

ts
function usePostCollections(postPath): ComputedRef<PostCollectionInfo[]>;

Defined in: packages/valaxy/client/composables/collections.ts:106

Find which collection(s) a given post path belongs to. Checks both key-based items (/collections/{collKey}/{item.key}) and internal link items (item.link).

Parameters ​

postPath ​

MaybeRef<string>

Returns ​

ComputedRef<PostCollectionInfo[]>