Skip to content

pantoken / tools/demo/src / DemoMarkdownItOptions

Interfejs: DemoMarkdownItOptions

Opcje dla demoMarkdownIt: pola resolveDemo oraz opcjonalne łączenie przykładów na żywo.

Rozszerza

Właściwości

base?

optional base?: string

Bazowa ścieżka strony, np. /pantoken/ (domyślnie /).

Dziedziczone z

ResolveOptions.base


runnerPath?

optional runnerPath?: string

Ścieżka strony runnera, względem base (domyślnie play/index.html).

Dziedziczone z

ResolveOptions.runnerPath


demosPath?

optional demosPath?: string

Katalog źródeł demo hostowanych lokalnie, względem base (domyślnie demos/).

Dziedziczone z

ResolveOptions.demosPath


cssUrls?

optional cssUrls?: readonly string[]

Adresy URL arkuszy stylów, które runner wstrzykuje (do swojego chrome i każdego renderowanego wyniku): arkusze komponentów, wielotematyczny arkusz tokenów oraz arkusze wtyczek/powierzchni. Runner zmienia motyw przez przełączanie atrybutu data-pantoken-theme, więc jeden arkusz tokenów obejmuje wszystkie motywy.

Dziedziczone z

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.

Parametry

relativePath

string

Zwraca

string