Skip to content

template.ts#

View Markdown

Source

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

4 symbols 3 functions 1 modules 1 parameters 3 returns

Reference#

fnescapeHtml(str: string): stringEscapes HTML special characters.

Escapes HTML special characters.

Signature

function escapeHtml(str: string): string

View source

Parameters

  • str string

Returns

string
fngetDefaultSatoriTemplate(): OgImageTemplateFnReturns the built-in template for the Satori renderer. The Chromium template in…

Returns the built-in template for the Satori renderer.

The Chromium template intentionally uses browser CSS. Satori renders a much smaller CSS subset, so this keeps the default fast path in that subset.

Signature

export function getDefaultSatoriTemplate(): OgImageTemplateFn

View source

Returns

OgImageTemplateFn
fngetDefaultTemplate(): OgImageTemplateFnReturns the built-in default template function.

Returns the built-in default template function.

Signature

export function getDefaultTemplate(): OgImageTemplateFn

View source

Returns

OgImageTemplateFn
moduletemplateDefault OG image template. Uses inline HTML/CSS for a flat, low-color brand card with title, description, siteName, and…

Default OG image template.

Uses inline HTML/CSS for a flat, low-color brand card with title, description, siteName, and tags. No external dependencies required.

View source