Skip to content

pantoken / tools/demo/src / DemoMarkdownItOptions

Інтерфейс: DemoMarkdownItOptions

Параметри для demoMarkdownIt: поля resolveDemo плюс необов'язкове об'єднання живих прикладів.

Розширює

Властивості

base?

optional base?: string

Базовий шлях сайту, напр. /pantoken/ (за замовчуванням /).

Успадковано від

ResolveOptions.base


runnerPath?

optional runnerPath?: string

Шлях до сторінки runner'а, відносно base (за замовчуванням play/index.html).

Успадковано від

ResolveOptions.runnerPath


demosPath?

optional demosPath?: string

Каталог джерел демонстрацій для самостійного розміщення, відносно base (за замовчуванням demos/).

Успадковано від

ResolveOptions.demosPath


cssUrls?

optional cssUrls?: readonly string[]

URL-адреси таблиць стилів, які вставляє runner (у свій chrome і в кожен відрендерений результат): таблиці компонентів, багатотематична таблиця токенів і таблиці плагінів/поверхонь. Runner перемикає тему, змінюючи атрибут 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