Skip to content

pantoken / tools/demo/src / DemoMarkdownItOptions

Rhyngwyneb: DemoMarkdownItOptions

Dewisiadau ar gyfer demoMarkdownIt: y meysydd resolveDemo ynghyd â gweu enghreifftiau byw dewisol.

Yn estyn

Eiddo

base?

optional base?: string

Llwybr sylfaen y safle, e.e. /pantoken/ (diofyn /).

Etifeddwyd oddi wrth

ResolveOptions.base


runnerPath?

optional runnerPath?: string

Llwybr tudalen y rhedegwr, mewn perthynas â base (diofyn play/index.html).

Etifeddwyd oddi wrth

ResolveOptions.runnerPath


demosPath?

optional demosPath?: string

Cyfeiriadur ffynhonnell demo a leolir eich hun, mewn perthynas â base (diofyn demos/).

Etifeddwyd oddi wrth

ResolveOptions.demosPath


cssUrls?

optional cssUrls?: readonly string[]

URLau taflen-arddull y mae'r rhedegwr yn eu mewnosod (i'w chrome a phob canlyniad a rendredir): taflenni'r gydran, taflen token aml-ddefnydd, a thaflenni'r ategyn/arwyneb. Mae'r rhedegwr yn newid themâu trwy droi'r priodwedd data-pantoken-theme ymlaen/ac i ffwrdd, felly mae un daflen token yn cwmpasu pob thema.

Etifeddwyd oddi wrth

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.

Paramedrau

relativePath

string

Yn dychwelyd

string