简体   繁体   中英

Linking to external library documentation with TypeDoc

I have a TypeScript project, and I'm using TypeDoc to generate documentation for it. In my project I am using an external library that has its own existing documentation. In the TypeDoc output for my project I want to link the reader to the documentation for the external library without having to manually insert a URL.

The closest I've come to a solution is placing double brackets in the code comments around what I want to link to, like this:

/** I want to link to something called [[Foo]] */

But this doesn't seem to work for types in an external library.

Is this possible to achieve?

Yes you can use following syntax by putting text between square brackets [] and url between parenthesis () .

[Text to be displayed](URL)

For example: Link to an npm module called pg-structure .

[pg-structure](https://www.npmjs.com/package/pg-structure)

I also usually link to related paragraph by copying from npm link icon left to title. (See icon left to Synopsis title in example picture below)

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM