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