Skip to content

pantoken-root / 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


labels? ​

optional labels?: RunnerLabels

Áitiúil RunnerLabels do na cluaisíní radhairc an rithóra, a sheoltar i URL an rithóra.

Oidhrithe ó ​

ResolveOptions.labels


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


localeLabels? ​

optional localeLabels?: (relativePath) => RunnerLabels | undefined

Réitigh lipéid cluaisíní dearcadh an rithóra don leathanach reatha, ón a markdown-it env.relativePath

— an cuardach áitiúlachta céanna le DemoMarkdownItOptions.localePrefix. Ná cuir isteach do shuíomh aon-áinmneach site (taispeánfaidh an rithóir ansin a réamhshocruithe i mBéarla)).

Paraiméadair ​

relativePath ​

string

Tuairisceáin ​

RunnerLabels | undefined