TypeScript API / @contentia/astro/loader / contentiaCollections
Function: contentiaCollections()
ts
function contentiaCollections(options?): Promise<Record<string, AstroCollection>>;Build the collections object for src/content.config.ts from the catalog.
ts
import { contentiaCollections } from '@contentia/astro/loader';
import { z } from 'astro:content';
// `catalog: 'decap'` reads the collections out of your Decap config.yml.
// Any other CatalogProvider works the same way.
export const collections = await contentiaCollections({ dir: 'content', catalog: 'decap', z });Parameters
| Parameter | Type |
|---|---|
options? | ContentiaCollectionsOptions |
Returns
Promise<Record<string, AstroCollection>>