Skip to content

pantoken / tools/demo/src / DemoMarkdownItOptions

Schnittstelle: DemoMarkdownItOptions

Optionen für demoMarkdownIt: die resolveDemo-Felder plus optionales Live-Beispiel-Seaming.

Erweitert

Eigenschaften

base?

optional base?: string

Basis-Pfad der Seite, z. B. /pantoken/ (Standard /).

Geerbt von

ResolveOptions.base


runnerPath?

optional runnerPath?: string

Pfad der Runner-Seite, relativ zu base (Standard play/index.html).

Geerbt von

ResolveOptions.runnerPath


demosPath?

optional demosPath?: string

Self-hosted Demo-Quellverzeichnis, relativ zu base (Standard demos/).

Geerbt von

ResolveOptions.demosPath


cssUrls?

optional cssUrls?: readonly string[]

Stylesheet-URLs, die der Runner injiziert (in seine Chrome-Oberfläche und in jedes gerenderte Ergebnis): die Komponenten- sheets, das Multi-Theme-Token-Sheet und die Plugin-/Surface-Sheets. Der Runner thematisiert durch Umschalten des data-pantoken-theme-Attributs, sodass ein Token-Sheet alle Themes abdeckt.

Geerbt von

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.

Parameter

relativePath

string

Rückgabe

string