Skip to content

pantoken-root / tools/demo/src / DemoMarkdownItOptions

Atanga: DemoMarkdownItOptions ​

Ngā kōwhiringa mō demoMarkdownIt: ngā mara o te resolveDemo me te whakakotahitanga o ngā tauira ora (whēroi kōwhiringa).

Whānui ake ​

Ngā Rawa ​

base? ​

optional base?: string

Ara pūtake o te pae, hei tauira /pantoken/ (taunoa /).

I whakawhiwhia mai i ​

ResolveOptions.base


runnerPath? ​

optional runnerPath?: string

Ara whārangi mō te runner, e honohono ana ki base (taunoa play/index.html).

I whakawhiwhia mai i ​

ResolveOptions.runnerPath


demosPath? ​

optional demosPath?: string

Kōpaki puna whakaaturanga e tūmauhia ana e koe (self-hosted), e honohono ana ki base (taunoa demos/).

I whakawhiwhia mai i ​

ResolveOptions.demosPath


cssUrls? ​

optional cssUrls?: readonly string[]

Ngā URL o ngā pepa kāhua e whakauruhia ana e te runner (ki tōna chrome me ia hua kua whakairo): ngā pepa wāhanga, te pepa token maha-ākau, me ngā pepa mō ngā taputapu/āhua mata. Ka whakahaerehia ngā kaupapa ā-rangi o te runner mā te whakawhiti i te āhuatanga data-pantoken-theme, nō reira kotahi te pepa token ka kapi i ngā kaupapa katoa.

I whakawhiwhia mai i ​

ResolveOptions.cssUrls


labels? ​

optional labels?: RunnerLabels

Kua whakamāoritia RunnerLabels mō ngā ripa tirohanga o te runner, ka tukuna i roto i te URL o te runner.

I whakawhiwhia mai i ​

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.

Ngā Tawhā ​

relativePath ​

string

Whakahokia ​

string


localeLabels? ​

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

Whakatau i ngā tapanga ripa tirohanga o te runner mō te whārangi o nāianei, mai i tōna markdown-it env.relativePath

— he rapu reo kei te rite anō ki DemoMarkdownItOptions.localePrefix. Whakakore mō tētahi pae kotahi-reo

(site — ka whakaatu te runner i ōna taunoa Ingarihi)).

Ngā Tawhā ​

relativePath ​

string

Whakahokia ​

RunnerLabels | undefined