Idea for neat external module names
See original GitHub issueFirst of all, TypeDoc 0.2.3 works great with TypeScript 1.4! Very happy with that 😃
But, I do have a request. We use a lot of external modules. The names of these modules are currently automatically composed using the relative path of the module surrounded by double quotes. This composed name is then displayed in the generated documentation (title + TOC). The name is also used as file name for the page of the module. In this file name the invalid characters are replaced with an underscore. This results in a bit “ugly” file names for external modules. Module x
is displayed as "x"
in the documentation and the file name for the page shows _x_.html
(see screenshot below). I understand this is done to avoid name conflicts with inline modules with the same name. Seems logical.
May I do the following proposal to streamline the module name and file name:
- Remove the double quote prefix and suffix out of the reflection name in the
onBeginResolve
function of the classDynamicModulePlugin
; - Split up the name and file name in 2 separate properties (currently
reflection.name
is used for both the display name and the file name). Add a specific property for controlling the file name, so there can be a difference in the display name and the file name; - Prefix this file name property for external modules with something like
module_
. The module with namex
will end up with the file namemodule_x.html
. - Add a new tag for the external module comment block (for example
@module [name]
) to allow a custom name override instead of the generated name based on the relative path. This allows neat module naming. If the@module
tag is omitted the path name is used instead (just how it now works, but without the double quote prefix and suffix of course 😃).
Let me know what you think of this idea. I can help you with the implementation if you want/like. I also have another idea for a future release: Automatic inheritance diagram generation (using SVG). Doxygen has such a feature for C++ documentation. But a rather simple implementation should be possible in TypeDoc. Basically the class inheritance is already plotted in the “Hierarchy” block. So all the necessary data sits there… As you can see we embed manually drawn diagrams in the description markdown and it looks great. Automatic inheritance diagrams would be a very nice addition in my opinion!
Issue Analytics
- State:
- Created 9 years ago
- Reactions:2
- Comments:11 (6 by maintainers)
I came to a problem with the double quote, modules/*.html file generated will have a
_
prefix, and I will get a 404 when I put these files on my website on github. It seems github will hide these files. Is there a way I could generate files without_
?Related to @taoqf’s comment, above: https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/
I had to customize my documentation build to add a
.nojekyll
file to the documentation output directory to get around this.