TypeScript API / @laikacms/astro/loader / laikaCollections
Function: laikaCollections()
ts
function laikaCollections(options?): Promise<Record<string, AstroCollection>>;Build the collections object for src/content.config.ts from the catalog.
ts
import { laikaCollections } from '@laikacms/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 laikaCollections({ dir: 'content', catalog: 'decap', z });Parameters
| Parameter | Type |
|---|---|
options | LaikaCollectionsOptions |
Returns
Promise<Record<string, AstroCollection>>