Skip to main content

Including a README

Overview​

You can instruct JSDoc to include a Markdown README file as the content of the documentation's home page (the index.html). This saves you from duplicating information and keeps the entry point of your documentation in sync with your project's README.

Using the command line​

Pass the path to your README with the -R (or --readme) flag:

Include your READMEnpx jsdoc -R README.md -r src -d docs

Using a configuration file​

Set opts.readme in your jsdoc.json:

{
"opts": {
"readme": "README.md",
"destination": "docs",
"recurse": true
},
"source": {
"include": ["src"]
}
}

Markdown formatting​

JSDoc renders the README as Markdown by default (no plugin required for README files). Code fences, tables, and headings are all supported.

See also​