typedoc icon indicating copy to clipboard operation
typedoc copied to clipboard

Add ids to tag-generated headers

Open FreePhoenix888 opened this issue 2 years ago • 3 comments

Search Terms

anchor, examples, ids, headers

Problem

There is no possibility to give a link to a header from generated documentation.
I would like to link examples in readme

Suggested Solution

Add ids to headers like you do in your own documentation: https://typedoc.org/guides/doccomments/#escaping-comments

FreePhoenix888 avatar Jun 09 '23 11:06 FreePhoenix888

Typedoc already does this?

https://typedoc.org/example/#md:index-of-examples

Gerrit0 avatar Jun 09 '23 11:06 Gerrit0

Typedoc already does this?

https://typedoc.org/example/#md:index-of-examples

Thank you for answer. I actually just now came to this solution:

/**
 * @example
 * #### Example 1
 * ... Code
 * #### Example 2
 * ... Code

*/

Before I have been using @example tag multiple times. Is my solution fine?

FreePhoenix888 avatar Jun 09 '23 12:06 FreePhoenix888

Ah, yes, typedoc doesn't put out ids for headings generated from tag names, it totally should though!

Gerrit0 avatar Jun 11 '23 19:06 Gerrit0

Fixed with 0.26, which is releasing 2024/06/21

Gerrit0 avatar Jun 16 '24 21:06 Gerrit0

Thank you! @Gerrit0

FreePhoenix888 avatar Jun 17 '24 07:06 FreePhoenix888