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

How to organize navigation (the left sidebar) by category without the remainder being placed in a default "Other" category? #2656

Closed
NkemdiAnyiam opened this issue Aug 5, 2024 · 1 comment · Fixed by #2664
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged
Milestone

Comments

@NkemdiAnyiam
Copy link

Search terms

navigation, category, default category

Question

I'm trying to use the "navigation" > "includeCategories" option in typedoc.json to organize the left nav bar. When I use the "@category" tag within my doc comments, the reflections are correctly placed under those categories in the navigation, but everything else is placed under a default category called "Other". How do I disable this default categorization and allow any uncategorized reflections to just remain where they are?

I'm not sure how clear my question is, so here is an example: Suppose I have a module named colors.ts which has 6 interfaces named Red, Orange, Yellow, Green, Blue, and Purple and 1 class named Color. By default, once the documentation is generated, all 7 would be listed straight under "colors". If I then applied "@category Warm" to the first 3 interfaces and "@category Cool" to the latter 3 interfaces in their doc comments, I want the navigation layout to look something like this:

  • colors
    • C Color
    • Warm
      • I Red
      • I Orange
      • I Yellow
    • Cool
      • I Green
      • I Blue
      • I Purple

Instead, it looks like this:

  • colors
    • Other
      • C Color
    • Warm
      • I Red
      • I Orange
      • I Yellow
    • Cool
      • I Green
      • I Blue
      • I Purple
@NkemdiAnyiam NkemdiAnyiam added the question Question about functionality label Aug 5, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 8, 2024

There is no way to do this today. TypeDoc's category plugin assumes that there are either no categories, and each reflection is placed directly within a group, or every symbol is placed within a category. This is important as traversing the groups/categories is how TypeDoc determines how to render both the left hand navigation and the list of reflections within the module's page.

I'm not opposed to allowing the defaultCategory option to be set to none, in which case TypeDoc renders the reflections without a category header...

@Gerrit0 Gerrit0 added enhancement Improved functionality help wanted Contributions are especially encouraged good first issue Easier issue for first time contributors and removed question Question about functionality labels Aug 8, 2024
@Gerrit0 Gerrit0 added this to the v0.26.6 milestone Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants