TypeScript API / @laikacms/astro/live / LiveDocumentsLoaderOptions
Interface: LiveDocumentsLoaderOptions
Properties
cache?
ts
optional cache?: LiveCacheOptions;collection?
ts
optional collection?: string;The Laika collection key. Defaults to the Astro collection name.
documents
ts
documents: DocumentsRepository;The documents repository to read. Required — unlike the build-time loaders there is no filesystem default, because this code may run on a runtime that has no filesystem.
entry?
ts
optional entry?: EntryOptions;name?
ts
optional name?: string;render?
ts
optional render?: LiveRenderOptions;select?
ts
optional select?: LaikaCollectionFilter;Defaults merged under the per-call filter.
validate?
ts
optional validate?: LiveValidateOptions;Reject entries that do not match the catalog's schema. Off by default; see LiveValidateOptions.
A failure surfaces as a ValidationError on the result's error, not a throw, so a page can branch on error.code the same way it does for every other failure this loader reports.