@nrser/typedoc-plugin-biblio
v0.1.0-nrser.1
Published
A TypeDoc plugin that adds support for references to externally hosted documentation
Downloads
1
Maintainers
Readme
typedoc-plugin-biblio
A plugin for TypeDoc that adds support for references to externally hosted documentation.
Installation
npm install --save-dev typedoc typedoc-plugin-biblio
Usage
The plugin provides custom links to external types through the use of a biblio.json
file:
node_modules/.bin/typedoc --biblio biblio.json
The biblio.json
file has the following format:
{
"namepath": "url",
}
Where "namepath"
is a key in one of the following formats:
"Type"
- A reference to the global identifierType
."Namespace.Type"
- A reference to the identifierType
on the global namespaceNamespace
."module:Type"
- A reference to the identifierType
in external modulemodule
."module:Namespace.Type"
- A reference to the identifierType
on the namespaceNamespace
in external modulemodule
.
For example:
{
"Iterable": "https://tc39.github.io/ecma262/#sec-symbol.iterator",
"Iterator": "https://tc39.github.io/ecma262/#sec-symbol.iterator",
"foo/bar:Baz": "http://foo.bar/Baz"
}
Arguments
This plugin adds the following additional arguments to TypeDoc:
--biblio <path>
Provides the path to a biblio.json
file.
Reflection Augmentations
This plugin also augments reflections with a urlTarget
property that can be used in themes to indicate that the reflection is documented
in an external location when urlTarget
has the value "external"
:
type.hbs:
...
<a href="{{relativeURL reflection.url}}" {{#if reflection.urlTarget}}target="{{reflection.urlTarget}}"{{/if}} class="tsd-signature-type">
{{reflection.name}}
</a>
...