Skip to content

pantoken / tools/demo/src / DemoMarkdownItOptions

Giao diện: DemoMarkdownItOptions

Tùy chọn cho demoMarkdownIt: các trường của resolveDemo cộng với việc ghép ví dụ trực tiếp tùy chọn.

Mở rộng

Thuộc tính

base?

optional base?: string

Đường dẫn gốc của site, ví dụ /pantoken/ (mặc định /).

Kế thừa từ

ResolveOptions.base


runnerPath?

optional runnerPath?: string

Đường dẫn trang runner, tương đối so với base (mặc định play/index.html).

Kế thừa từ

ResolveOptions.runnerPath


demosPath?

optional demosPath?: string

Thư mục nguồn demo tự lưu trữ, tương đối so với base (mặc định demos/).

Kế thừa từ

ResolveOptions.demosPath


cssUrls?

optional cssUrls?: readonly string[]

Các URL stylesheet mà runner chèn (vào chrome của nó và mọi kết quả được render): các tệp stylesheet của component, bảng token đa-theme, và các stylesheet plugin/bề mặt. Runner thay đổi theme bằng cách chuyển đổi thuộc tính data-pantoken-theme, nên một bảng token có thể áp dụng cho mọi theme.

Kế thừa từ

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.

Tham số

relativePath

string

Trả về

string