Skip to content

pantoken / demo

demo

Bêta

@pantoken/typedoc-plugin-demo — ategyn TypeDoc ar gyfer y tag bloc @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.)

Mae'r ffens yn mynd trwy'r markdown heb ei gyffwrdd — gan gynnwys unrhyw biblin cyfieithu sy'n cadw blociau cod — felly mae'r demo yn goroesi lleoleiddio.

Setup: ychwanegwch "@demo" i opsiwn blockTags TypeDoc. Mae'r dadlywydd sylwadau yn darllen y rhestr honnw cyn i'r ategynau lwytho, felly ni all ategyn gofrestru'r tag yn rhy hwyr i wahardd y rhybudd "tag bloc anhysbys" ; rhaid iddo fod yn eich typedoc.json.

Enghraifft

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

Newidynnau

Swyddogaethau