index.ts

Source

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

5 symbols 3 functions 1 interfaces 1 modules 13 parameters 13 members 3 returns

Reference

moduleindexox-content Built-in Plugins All plugins are designed with No-JavaScript-First principle. They generate static HTML at b…

ox-content Built-in Plugins

All plugins are designed with No-JavaScript-First principle. They generate static HTML at build time and require no client-side JS.

View source

fnnormalizeSelfClosingEmbeds(html: string): stringCustom embed tags are not HTML void elements, so a self-closing authoring form…

Custom embed tags are not HTML void elements, so a self-closing authoring form like <GitHub ... /> reaches the HTML re-parsers (Shiki highlighting, embed transforms) as an unclosed element that swallows the rest of the document. Normalize to an explicit open/close pair before any rehype pass runs.

Signature

export function normalizeSelfClosingEmbeds(html: string): string

View source

Parameters

  • html string

Returns

string
interfaceTransformAllOptionsTransform all plugin components in HTML. Call this during SSG build to process…

Transform all plugin components in HTML. Call this during SSG build to process all plugins at once.

Signature

export interface TransformAllOptions

View source

Members

Properties
NameTypeDescription
blueskyoptional boolean
githuboptional boolean | GitHubOptions
githubTokenoptional string
mermaidoptional boolean
ogpoptional boolean | OgpOptions
openGraphoptional boolean | OgpOptions
pmoptional boolean | PmOptions
Expand <pm> package-manager blocks into install tabs. Pass an object to
opt in to synced groups ({ sync: true }); syncing is off by default.
Default false
spotifyoptional boolean
stackBlitzoptional boolean
tabsoptional boolean
twitteroptional boolean | TwitterEmbedOptions
webContaineroptional boolean
youtubeoptional boolean
fntransformAllPlugins(html: string, options: TransformAllOptions = {}): Promise<string>Transform all enabled plugins in HTML content.

Transform all enabled plugins in HTML content.

Signature

export async function transformAllPlugins(html: string, options: TransformAllOptions = {}): Promise<string>

View source

Parameters

Returns

Promise<string>
fntransformBuiltinEmbeds(html: string, options: { github: GitHubOptions | false; openGraph: OgpOptions | false; pm?: PmOptions | false; spotify?: boolean; stackBlitz?: boolean; twitter?: boolean | TwitterEmbedOptions; bluesky?: boolean; webContainer?: boolean; }): Promise<string>Transform built-in embed components in HTML content.

Transform built-in embed components in HTML content.

Signature

export async function transformBuiltinEmbeds(html: string, options: {
    github: GitHubOptions | false;
    openGraph: OgpOptions | false;
    pm?: PmOptions | false;
    spotify?: boolean;
    stackBlitz?: boolean;
    twitter?: boolean | TwitterEmbedOptions;
    bluesky?: boolean;
    webContainer?: boolean;
  }): Promise<string>

View source

Parameters

  • html string
  • options { github: GitHubOptions | false; openGraph: OgpOptions | false; pm?: PmOptions | false; spotify?: boolean; stackBlitz?: boolean; twitter?: boolean | TwitterEmbedOptions; bluesky?: boolean; webContainer?: boolean }
  • options.github GitHubOptions | false
  • options.openGraph OgpOptions | false
  • options.pm? PmOptions | false

    optional

  • options.spotify? boolean

    optional

  • options.stackBlitz? boolean

    optional

  • options.twitter? boolean | TwitterEmbedOptions

    optional

  • options.bluesky? boolean

    optional

  • options.webContainer? boolean

    optional

Returns

Promise<string>