Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

  • Which JSDoc template is lodash documentation using?
  • If the template is irrelevant, how can I have categories in my documentation?
like image 629
Flame_Phoenix Avatar asked Jan 29 '23 23:01

Flame_Phoenix


1 Answers

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

like image 101
wojtekk Avatar answered Feb 01 '23 22:02

wojtekk