Skip to content

pantoken / demo

demo

베타

@pantoken/typedoc-plugin-demo@demo 블록 태그용 TypeDoc 플러그인입니다.

Authors attach a live, embeddable demo to any symbol with @demo <spec>, where <spec> is either a bare URL or a <provider>:<ref> pair (for example stackblitz:abc123, codesandbox:xy12z, wp-playground:https://…/blueprint.json, or self:button). This plugin registers nothing about providers itself — it stays deliberately dumb and reusable: it moves each @demo tag's spec into a fenced demo block appended to the symbol's summary, and your docs renderer decides how to turn a spec into an iframe. (See @pantoken/demo for a renderer that resolves the providers.)

마크다운의 펜스는 손대지 않고 통과합니다 — 코드 블록을 보존하는 번역 파이프라인도 포함됩니다 — 그래서 데모는 지역화되어도 그대로 유지됩니다.

설정: "@demo"을 TypeDoc의 blockTags 옵션에 추가하세요. 주석 파서는 플러그인이 로드되기 전에 그 목록을 읽기 때문에 플러그인이 "unknown block tag" 경고를 억제하기 위해 태그를 너무 늦게 등록할 수 없습니다; 태그는 typedoc.json에 있어야 합니다.

예제

jsonc
// typedoc.json
{
  "plugin": ["typedoc-plugin-markdown", "@pantoken/typedoc-plugin-demo"],
  "blockTags": ["@param", "@returns", "@example", "@demo"]
}

변수

함수