Skip to content

TypeScript API / @laikacms/astro/live / LiveRenderOptions

Interface: LiveRenderOptions ​

Properties ​

bodyField? ​

ts
optional bodyField?: string;

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


markdown? ​

ts
optional markdown?: (body) => Promise<string>;

Renders a body to HTML. Required for mode: 'markdown'.

There is no default: bundling a markdown parser here would put it in the server bundle of every page that reads a live collection, whether or not that page renders prose.

Parameters ​

ParameterType
bodystring

Returns ​

Promise<string>


mode? ​

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

Defaults to 'none'. 'markdown' requires markdown.

Released under the MIT License.