Search code examples
javascriptjsdoc

Populate JSDoc index.html page


I am starting out with jsdoc and docdash and everything seems to be going ok so far. However, even though my modules and such are slowly being documented I haven't figured out how to add items to the index.html file that is generated. What markup is required in the files to generate items into the root HTML file?

For more reference, at the top of the left-hand navigation pane is a "Home" link. This is what I am referring to when I am asking this question. The link goes essentially to a blank page, but all the other links below this have the correct documentation from the comments.


Solution

  • The documentation is somewhat misleading in how to do this. It says that as long as a README.md file is located within your source directories it will use the first file it finds as the index.html file. This isn't entirely true. You also have to specify a path to the README.md file you want to use:

    jsdoc -c jsdoc.json --readme ./README.md