Saltearse al contenido

lib/markdown-prerender

Esta página aún no está disponible en tu idioma.

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>