This is my first time been asked to write a documentation and my choice of way to do it is by using jsdoc.
This following is the sample jsdoc.json config file for my jsdoc. It read just a single README.md file.
{
  "source": {
    "include": "./client/src",
    "includePattern": ".js$",
    "excludePattern": "(node_modules/|docs)"
  },
  "plugins": ["plugins/markdown"],
  "templates": {
    "cleverLinks": true,
    "monospaceLinks": true,
  },
  "opts": {
    "recurse": true,
    "destination": "./docs/",
    "readme": "./README.md"
  }
}
How can I make it to read multiple .md file like if I have index.md and content.md?
I just wanted to do the same functionality, and the approach that I found is not perfect, but it works good enough. In JSDOC there is an functionality called "tutorials".
What I have done, is created on the root of my project folder "Tutorials" and added to the "opts" section in my config file the following:
"opts": {
   "tutorials": "./Tutorials",
}
In the tutorials folder you create as many .md files you need, keeping in mind that every tutorial needs to have unique name.
Every time you want to connect something with specific tutorial (for example tutorial called "content.md") you need to put
{@tutorial content}
This works in both Readme.md and any js file you have documentation. Also you can connect one tutorial with another.
you can learn more about the feature here:
https://jsdoc.app/about-tutorials.html
https://jsdoc.app/tags-inline-tutorial.html
my answer is a bit late, but I hope this can at least help you for future projects :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With