javascriptdocumentationlodashjsdoc

How to create categories in JSDoc?


Background

I am documenting my own JS library, and I stumbled upon the lodash library ( https://lodash.com/docs/4.17.4 ).

It's documentation has a sidebar with categories ( Array, Collection, ect ) and each one has documentation for the functions.

Objective

I would like my documentation to have a similar structure using the latest JSDoc version.

Problem

After investigating I couldn't find the jsdoc template used by lodash. I also couldn't find a similar feature nor how to replicate it using JSDOC.

Questions


Solution

  • Solution

    After much research I concluded that adding a @category with jsdoc was impossible. In fact, many have tried before and failed:

    The only way to somehow simulate this behavior is to use @namespace, but this solution is heavy in drawbacks and is limited in scope:

    Still, until such a feature is supported, this is what I am using.