Skip to content

pantoken / tools/demo/src / DemoMarkdownItOptions

Comhéadan: DemoMarkdownItOptions

Roghanna don demoMarkdownIt: na réimsí in resolveDemo agus móide nasc roghnach le samplaí beo.

Síneann

Airíonna

base?

optional base?: string

Bonnshlí an láithreáin, m.sh. /pantoken/ (réamhshocraithe /).

Oidhrithe ó

ResolveOptions.base


runnerPath?

optional runnerPath?: string

Cosán leathanach an rithóra, coibhneas le base (réamhshocraithe play/index.html).

Oidhrithe ó

ResolveOptions.runnerPath


demosPath?

optional demosPath?: string

Eolaire foinse-demo féin-óstáilte, coibhneas le base (réamhshocraithe demos/).

Oidhrithe ó

ResolveOptions.demosPath


cssUrls?

optional cssUrls?: readonly string[]

URLs bileog stíle a insteallann an rithóir (i gcraiceann aige agus i ngach toradh a rindreáiltear): na bileoga comhpháirte, an bileog token il-théama, agus na bileoga breiseán/dromchla. Téamaíonn an rithóir trí thréith data-pantoken-theme a athrú, mar sin clúdaíonn bileog token amháin gach téama.

Oidhrithe ó

ResolveOptions.cssUrls


liveExample?

optional liveExample?: LiveExampleOptions

When set, appends a live preview after each html fence on matching pages — the same markup, rendered live, beneath its source. Overlay examples (<dialog>, [popover]) are skipped: they're hidden until opened, so a ## Demo iframe drives their preview instead.


localePrefix?

optional localePrefix?: (relativePath) => string

Route a demo:self:<name> fence to a locale-specific self-hosted demo directory, from the current page's markdown-it env.relativePath (e.g. "hu/" for pages under hu/, "" for the root locale). Prepended to demosPath so the localized clone of a demo (translated prose, same markup) loads instead of the English source. Omit for a single-locale site.

Paraiméadair

relativePath

string

Tuairisceáin

string