Reputation: 17574
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.
I would like my documentation to have a similar structure using the latest JSDoc version.
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.
Upvotes: 4
Views: 5642
Reputation: 114
Problem with category tag support by JSDoc lays not in plugin per se, but in template which needs to have support for the category tag. Personally I use the Docdash template and I took the time and extended the Docdash template with support for category. Usable from the get-go - just needs config.
https://www.npmjs.com/package/docdash-extended
Upvotes: 0
Reputation: 51
Just wanted to share an answer that I finally had for once on stackoverflow. You can indeed add @category
tags to your JSDoc, you just need to install this plugin via config file:
Upvotes: 0
Reputation: 616
I've just released a new version of better-docs jsdoc
template and it supports @category tag. Just add it to your class/module/whatever and it will be namespaced in the sidebar.
https://github.com/SoftwareBrothers/better-docs
Upvotes: 5
Reputation: 17574
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.
Upvotes: 3