Skip to content

pantoken-root / tools/demo/src / DemoMarkdownItOptions

インターフェース: DemoMarkdownItOptions ​

のオプション: the resolveDemo フィールドと、オプションのライブ例の結合。

拡張 ​

プロパティ ​

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


labels? ​

optional labels?: RunnerLabels

ランナーの表示タブ用にローカライズされた RunnerLabels。ランナーの URL に転送されます。

継承元 ​

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.

パラメーター ​

relativePath ​

string

戻り値 ​

string


localeLabels? ​

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

現在のページのランナーの表示タブラベルを、その markdown-it env.relativePath から解決します — DemoMarkdownItOptions.localePrefix と同じロケール検索です。単一ロケールの サイトでは省略します(ランナーは英語のデフォルトを表示します))。

パラメーター ​

relativePath ​

string

戻り値 ​

RunnerLabels | undefined