Skip to content

pantoken / tools/demo/src / DemoMarkdownItOptions

رابط: DemoMarkdownItOptions

گزینه‌ها برای demoMarkdownIt: فیلدهای 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 فایل‌های استایل که رانر وارد می‌کند (در کروم آن و هر نتیجهٔ رندرشده): شیت‌های مؤلفه، شیت توکن چندتمی، و شیت‌های پلاگین/سِرفِیس. رانر با تغییر ویژگی data-pantoken-theme تم‌ها را اعمال می‌کند، بنابراین یک شیت توکن همهٔ تم‌ها را پوشش می‌دهد.

ارث‌بری از

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