A powerful tool to easily generate beautiful HTML documentation from Javascript (JSDoc), Markdown and HTML files.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin fix(serve): use app.base Apr 22, 2018
lib fix(serve): use app.base Apr 22, 2018
templates/zebra fix edge-shadow on hover Apr 29, 2018
test minor Apr 12, 2018
.bowerrc add missing web components Jun 10, 2016
.editorconfig initial commit May 19, 2016
.eslintignore eslint config Dec 27, 2017
.eslintrc.json update eslint Jan 15, 2018
.gitignore update Feb 9, 2018
CHANGELOG.md 2.1.0 Apr 29, 2018
LICENSE update license Jan 9, 2018
README.md update readme Apr 14, 2018
bower.json update DocmaWeb deps to latest Apr 11, 2018
docma-logo.png logo Dec 27, 2017
docma-screen.gif update gif Apr 12, 2018
docma-screen.jpg update docma-screen Apr 11, 2018
index.js fix(serve): use app.base Apr 22, 2018
package-lock.json 2.1.0 Apr 29, 2018
package.json 2.1.0 Apr 29, 2018



npm release license downloads dependencies maintained documentation
© 2018, Onur Yıldırım (@onury).

A powerful tool to easily generate beautiful HTML documentation from Javascript (JSDoc), Markdown and HTML files.


  • Parse JSDoc documentation, Markdown and HTML files.
  • Build a cool SPA (Single Page Application) from parsed files.
  • Generate multiple/separate API documentations by grouping JS files.
  • Path or Query-string based app routing.
  • Non-opinionated engine, built-in template with cool opinions. 😎
  • Supports custom templates, comes with template authoring tools.
  • Works great with GitHub Pages, Amazon S3, Nginx, Apache, etc...
  • Build via API or CLI.
  • Extremely configurable and debuggable.
  • Well documented. ☝️

...like this:

Docma screen

This is generated with the built-in template, Zebra.
click to view live


npm i docma -g

Building Documentation with CLI

You can use Docma CLI to build documentations directly from your console. Once you create the configuration (JSON) file, it's quite simple.

docma -c path/to/docma.json

You can even serve the docs locally and test.

docma serve path/to/docs


Building Documentation Programmatically

If you need to build documentation from within your code, use the API.

const Docma = require('docma');

Either by passing a configuration object.

const config = {
    src: [
    dest: './output/doc'
    .then(success => console.log('Documentation is built successfully.'))
    .catch(error => console.log(error));

Or by reading configuration from a JSON file.

    .catch(error => console.log(error));

See Docma API Reference.

Parsed Output

To investigate the parsed JSDoc output, enable the debug option that will create a JSON output(s) within the root of the destination directory. If you have a problem with the parsed documentation data, open an issue @ jsdoc-x. (I'm the author.)

For markdown output issues (that are not related with style), you can open an issue @ marked.


Note: If you're upgrading from Docma v1.x to v2.x, there are some breaking changes.


Read Docma documentation, built with Docma, for a Docma demo... 👀


MIT. You don't have to include any copyright notice in your documentation output or templates but I'd appreciate if you let people know about this tool so we can read better documentations.

Emoji shortcuts used in source markdown files are parsed into twemoji. Graphics and icons licensed under CC-BY 4.0.

Related Modules

  • jsdoc-x — Parser for outputting a Javascript object from documented code via JSDoc's explain (-X) command.
  • marked — A full-featured markdown parser and compiler, written in JavaScript. Built for speed.
  • dustjs — Asynchronous Javascript templating for the browser and server.