Skip to content

TypeScript API / @contentia/astro/loader / RenderOptions

Interface: RenderOptions ​

Properties ​

bodyField? ​

ts
bodyField?: string;

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


filePath? ​

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

Resolve a Contentia 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
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
retainBody?: boolean;

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