lib/markdown-prerender
이 콘텐츠는 아직 번역되지 않았습니다.
Functions
Section titled “Functions”parseCallouts()
Section titled “parseCallouts()”function parseCallouts(opt: undefined | false | "github" | "obsidian" | "vitepress"): | undefined | false | { theme: "github" | "obsidian" | "vitepress";};
Defined in: studiocms/packages/@studiocms/md/src/lib/markdown-prerender.ts:9^
Parameters
Section titled “Parameters”undefined
| false
| "github"
| "obsidian"
| "vitepress"
Returns
Section titled “Returns”| undefined
| false
| {
theme
: "github"
| "obsidian"
| "vitepress"
;
}
preRender()
Section titled “preRender()”function preRender(): (content: string) => Promise<string>;
Defined in: studiocms/packages/@studiocms/md/src/lib/markdown-prerender.ts:47^
Creates a pre-render function for processing markdown content based on the configured renderer flavor.
Returns
Section titled “Returns”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.
(content: string): Promise<string>;
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”Promise
<string
>