Skip to content

pantoken-root / 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(크롬과 렌더된 모든 결과에 적용): 컴포넌트 시트, 다중 테마 토큰 시트, 그리고 플러그인/표면 시트입니다. 러너는 data-pantoken-theme 속성을 전환하여 테마를 바꾸므로 하나의 토큰 시트로 모든 테마를 커버합니다.

상속됨 ​

ResolveOptions.cssUrls


labels? ​

optional labels?: RunnerLabels

러너의 보기 탭을 위한 로컬라이즈된 RunnerLabels입니다. 러너 URL로 전달됩니다.

상속됨 ​

ResolveOptions.labels


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


localeLabels? ​

optional localeLabels?: (relativePath) => RunnerLabels | undefined

현재 페이지에 대한 러너의 보기-탭 레이블을 markdown-it의 env.relativePath 에서 해결합니다 — DemoMarkdownItOptions.localePrefix와 동일한 로케일 조회 방식입니다. 단일 로케일 사이트의 경우 생략하세요(러너는 영어 기본값을 표시합니다)).

매개변수 ​

relativePath ​

string

반환값 ​

RunnerLabels | undefined