APIMarkdownRenderer

MarkdownRenderer

The MarkdownRenderer extends TypeDoc’s Renderer instance with custom hooks and async jobs.

Extends

Methods

on()

Call Signature

on(event, callback): void

Parameters
ParameterTypeDescription
event"beginPage" | "endPage"Triggered before or after a document will be rendered.
callback(page) => voidReceives the MarkdownPageEvent object as an argument.
Returns

void

Example
app.renderer.on(MarkdownPageEvent.BEGIN, (renderer) => {});
Overrides

Renderer.on

Call Signature

on(event, callback): void

Parameters
ParameterTypeDescription
event"beginRender" | "endRender"Triggered before or after rendering the project.
callback(page) => voidReceives the MarkdownRendererEvent object as an argument.
Returns

void

Example
app.renderer.on(MarkdownRendererEvent.BEGIN, (renderer) => {});
Overrides

Renderer.on

Properties

defineTheme()

defineTheme: (name, theme) => void

Define a new theme that can be used to render output.

Parameters

ParameterTypeDescription
namestringThe name of the theme.
theme(renderer) => MarkdownThemeThe theme class to use.

Returns

void

Overrides

Renderer.defineTheme


markdownHooks

markdownHooks: EventHooks<MarkdownRendererHooks, string>


preRenderAsyncJobs

preRenderAsyncJobs: (output) => Promise<void>[]

A list of async jobs which must be completed before rendering output.

Note: This array is cleared after calling the contained functions on each call.

Parameters

ParameterType
outputMarkdownRendererEvent

Returns

Promise<void>

Overrides

Renderer.preRenderAsyncJobs


postRenderAsyncJobs

postRenderAsyncJobs: (output) => Promise<void>[]

A list of async jobs which must be completed after rendering output files but before generation is considered successful. These functions will be called after all documents have been written to the filesystem.

Note: This array is cleared after calling the contained functions on each call.

Parameters

ParameterType
outputMarkdownRendererEvent

Returns

Promise<void>

Overrides

Renderer.postRenderAsyncJobs