Skip to content

render-markdown.ts#

View Markdown

Source

4 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

4 symbols 2 functions 1 interfaces 1 modules 4 parameters 1 members 2 returns

Reference#

fncreateMarkdownProcessor(options: OxContentOptions = {}): MarkdownProcessorResolves public options once so custom ssg: false hosts can reuse the pipeline.

Resolves public options once so custom ssg: false hosts can reuse the pipeline.

Signature

export function createMarkdownProcessor(options: OxContentOptions = {}): MarkdownProcessor

View source

Parameters

Returns

MarkdownProcessor
interfaceMarkdownProcessorProcessor that resolves OxContentOptions once and renders many documents.

Processor that resolves OxContentOptions once and renders many documents.

Signature

export interface MarkdownProcessor

View source

Members

Methods
render()
render(source: string, filePath: string): Promise<TransformResult>;
Parameters
  • source
  • filePath
Returns
Promise<TransformResult>
modulerender-markdownProgrammatic Markdown/MDX pipeline for hosts that do not import files through Vite.

Programmatic Markdown/MDX pipeline for hosts that do not import files through Vite.

View source

fnrenderMarkdown(source: string, filePath: string, options: OxContentOptions = {}): Promise<TransformResult>Run the Vite plugin Markdown/MDX pipeline from public OxContentOptions. Returns…

Run the Vite plugin Markdown/MDX pipeline from public OxContentOptions.

Returns structured TransformResult fields (html, frontmatter, toc, MDX metadata) so consumers do not need to cast a Vite hook or parse generated module source. .md / .mdx inference matches oxContent().

Signature

export function renderMarkdown(source: string, filePath: string, options: OxContentOptions = {}): Promise<TransformResult>

View source

Parameters

  • source string
  • filePath string
  • options OxContentOptions

    optional · default: {}

Returns

Promise<TransformResult>