Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to include modules in the top level toc #988

Closed

Conversation

unstubbable
Copy link

Together with typedoc-plugin-monorepo this enables monorepos to generate combined API docs for their packages using "external modules".

Example

Together with typedoc-plugin-monorepo this enables monorepos to generate
combined API docs for their packages using "external modules".
@aciccarello
Copy link
Collaborator

Thanks for the contribution. However, I'm not sure that it makes sense to add this just for a single plugin. Can you explain why this is necessary?

@unstubbable
Copy link
Author

Hmm, I thought it could be useful in general to have the option to list modules as top level toc entries. I just mentioned the plugin because this option would be especially helpful in the context of libraries that publish multiple packages under a common scope and are organized in a monorepo, which seems to become more and more common (e.g. Babel).

If you don’t agree, is there the possibility to replace the TocPlugin with a custom one?

@aciccarello
Copy link
Collaborator

I believe you should be able to listen to the same event as the TocPlugin and add items to the page navigation that way. Also, you should be able to add the option decorator within the plugin.

I like the idea but I generally try to keep the core as simple as possible. If you have success with making a plugin, please tag it on npm and share a link here so others can find it. As a side note, we could use help writing a guide to creating plugins if you are interested (#521).

@unstubbable
Copy link
Author

I published a replacement of the TocPlugin as part of my fork of the aforementioned typedoc-plugin-monorepo. It lists modules as top-level entries in the table of contents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants