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 שלו ולכל תוצאה שנ-render): גיליונות הרכיב, גיליון הטוקנים רב-הנושאים, וגיליונות התוסף/משטח. ה-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