Skip to content

pantoken / demo

demo

בטא

@pantoken/typedoc-plugin-demo — תוסף TypeDoc עבור תג הבלוק @demo.

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.)

החסימה עוברת דרך markdown ללא שינוי — כולל כל צינור תרגום ששומר על בלוקי קוד — כך ההדגמה שורדת את הלוקליזציה.

הגדרה: הוסף "@demo" לאופציית blockTags של TypeDoc. מפענח ההערות קורא את הרשימה הזו לפני טעינת התוספים, כך שתוסף לא יכול לרשום את התג מאוחר מספיק כדי למנוע את ההצגה של "unknown block tag" אזהרה; היא חייבת להיות ב־typedoc.json שלך.

דוגמה

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

משתנים

פונקציות