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 ของ stylesheet ที่รันเนอร์ฉีดใส่ (ทั้งในส่วน chrome และผลลัพธ์ที่เรนเดอร์ทุกชิ้น): แผ่นสไตล์ของคอมโพเนนต์ แผ่นโทเค็นหลายธีม และแผ่นของปลั๊กอิน/พื้นผิว รันเนอร์สลับธีมโดยการสลับ แอตทริบิวต์ 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