lib/markdown-prerender
Esta página aún no está disponible en tu idioma.
Functions
Section titled “Functions”preRender()
Section titled “preRender()”function preRender(): (content: string) => Promise<string>
Defined in: studiocms/packages/@studiocms/md/src/lib/markdown-prerender.ts:54^
Creates a pre-render function for processing markdown content based on the configured renderer flavor.
Returns
Section titled “Returns”Function
A function that takes a markdown content string and returns a Promise resolving to the rendered string.
The pre-render function dynamically selects the markdown processor to use:
- If the
rendererConfig.flavor
is set to'astro'
, it uses theastroMD.render
method. - Otherwise, it defaults to using the
studioCMSMD.render
method.
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”Promise
<string
>