Render a Markdown document

octokit.markdown.render({
text,
});

Parameters

namerequireddescription
textyes

The Markdown text to render in HTML.

modeno

The rendering mode.

contextno

The repository context to use when creating references in gfm mode.

See also: GitHub Developer Guide documentation.

Render a Markdown document in raw mode

You must send Markdown as plain text (using a Content-Type header of text/plain or text/x-markdown) to this endpoint, rather than using JSON format. In raw mode, GitHub Flavored Markdown is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.

octokit.markdown.renderRaw({
data,
});

Parameters

namerequireddescription
datayes

raw markdown text

See also: GitHub Developer Guide documentation.