Aller au contenu

lib/markdown-prerender

Ce contenu n’est pas encore disponible dans votre langue.

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.

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 the astroMD.render method.
  • Otherwise, it defaults to using the studioCMSMD.render method.

string

Promise<string>