Skip to content

TypeScript API / @laikacms/astro/loader / RenderOptions

Interface: RenderOptions ​

Properties ​

bodyField? ​

ts
optional bodyField?: string;

Which content field holds the prose. Defaults to 'body'.


filePath? ​

ts
optional filePath?: (context) => string | undefined;

Resolve a Laika key to an on-disk path, for mode: 'deferred'.

Parameters ​

ParameterType
context{ collection: string; key: string; }
context.collectionstring
context.keystring

Returns ​

string | undefined


mode? ​

ts
optional mode?: "none" | "markdown" | "deferred";

How the body field becomes rendered output.

  • 'markdown' (default) — rendered eagerly through Astro's markdown pipeline. Works for every repository, including remote ones.
  • 'none' — no rendering; body is still exposed for a custom renderer.
  • 'deferred' — hand rendering to Vite at request time. This is the only route to MDX and to your own remark/rehype plugins, but Astro resolves a deferred entry through its file path, so it requires filePath and a repository backed by real files on disk.

retainBody? ​

ts
optional retainBody?: boolean;

Keep the raw body on the entry. Defaults to true.

Released under the MIT License.