[英]Linking to external library documentation with TypeDoc
I have a TypeScript project, and I'm using TypeDoc to generate documentation for it.我有一个 TypeScript 项目,我正在使用 TypeDoc 为其生成文档。 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.
在我的项目的 TypeDoc 输出中,我想将阅读器链接到外部库的文档,而无需手动插入 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 ()
.是的,您可以通过将文本放在方括号
[]
和括号()
之间的 url 之间来使用以下语法。
[Text to be displayed](URL)
For example: Link to an npm
module called pg-structure
.例如:链接到名为
pg-structure
的npm
模块。
[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.我通常也通过从
npm
链接图标左复制到标题来链接到相关段落。 (See icon left to Synopsis
title in example picture below) (请参阅下面示例图片中
Synopsis
标题左侧的图标)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.