typedoc2md / typedoc-plugin-markdown

A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
https://typedoc-plugin-markdown.org
MIT License
689 stars 172 forks source link

Provide the ability to update or remove section headers for comment tags #637

Closed amkuchta closed 2 days ago

amkuchta commented 1 week ago

What package is the feature request related to?

typedoc-plugin-markdown

Background

I want to start out by saying that I love this plugin - I am currently using it to create markdown files that I serve up using MKDocs, and the output that it generates could not be more perfect with regards to style and formatting.

The only issue I have come across is that some of the comment tags (markdown and verbatim, to be specific) are generating headers that I don't want.

Proposed solution

Have a way to remove auto-generated headers or to create a custom header if we provide the text we want displayed after the tag

tgreyuk commented 1 week ago

I want to start out by saying that I love this plugin

Thanks - appreciated :)

Have a way to remove auto-generated headers or to create a custom header if we provide the text we want displayed after the tag

I'm not against this as such but i'm just trying to figure out the use-case. This kind of thing would probably be left to a custom plugin.

You can in theory already change the tag text by providing an alternative locale entry for the tag (caveat it is a bit of a hack). Tags can be translation with the tag_ prefix as follows:

comment

/**
 * @customTag
 */

typedoc.json

 {
   locales: {
    en: {
      tag_customTag: 'New Tag Name',
    },
  }
}
amkuchta commented 1 week ago

Thanks for the response! The specific use case that I was looking at was the @markdown and @verbatim tags - I was using them to force a table to appear correctly. I ended up working around it by adding an @remarks tag, and restructuring some docs.

tgreyuk commented 2 days ago

Closing with notes written in ticket as workaround.