Skip to content

pantoken / demo

demo

Βήτα

@pantoken/typedoc-plugin-demo — ένα plugin TypeDoc για το block tag @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. Ο αναλυτής σχολίων διαβάζει αυτή τη λίστα πριν φορτωθούν τα plugins, οπότε ένα plugin δεν μπορεί να καταχωρήσει το tag αρκετά αργά ώστε να καταστείλει την προειδοποίηση "unknown block tag" · πρέπει να βρίσκεται στο typedoc.json σας.

Παράδειγμα

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

Μεταβλητές

Συναρτήσεις