Skip to content

pantoken / tools/demo/src / DemoMarkdownItOptions

インターフェース: DemoMarkdownItOptions

Options for demoMarkdownIt: the resolveDemo fields plus optional live-example seaming.

拡張

プロパティ

base?

optional base?: string

サイトのベースパス。例: /pantoken/(デフォルト /)。

継承元

ResolveOptions.base


runnerPath?

optional runnerPath?: string

ランナーページのパス。base に対する相対パス(デフォルト play/index.html)。

継承元

ResolveOptions.runnerPath


demosPath?

optional demosPath?: string

セルフホストのデモソースディレクトリ。base に対する相対パス(デフォルト demos/)。

継承元

ResolveOptions.demosPath


cssUrls?

optional cssUrls?: readonly string[]

ランナーが注入するスタイルシートのURL(ランナーのchromeおよびレンダリングされたすべての結果に対して):コンポーネントシート、マルチテーマのトークンシート、プラグイン/サーフェスシート。ランナーは data-pantoken-theme 属性を切り替えてテーマを変更するため、1つのトークンシートで全てのテーマをカバーします。

継承元

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.

パラメーター

relativePath

string

戻り値

string