You can use Docma CLI to build documentations directly from your console. Once you create the configuration file
docma.json
in your project root, it's quite simple.
docma
You can even serve the docs locally and test.
docma serve
See Docma CLI Reference, Build Configuration and Docma F.A.Q. for more information.
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: [
'./code/**/*.js',
'./README.md'
],
dest: './output/docs'
};
Docma.create()
.build(config)
.catch(error => {
console.log(error);
});
Or by reading configuration from a JSON file.
Docma.create()
.build('./path/to/docma.json')
.catch(error => {
console.log(error);
});
See Docma API Reference, Build Configuration and Docma F.A.Q. for more information.
Docma includes a built-in template: Zebra, with a side-bar symbols menu, search and navigation features; and a beautiful layout. Actually you're viewing it right now ;}
You can also build your own template! See Creating Docma Templates.
MIT. You don't have to include any copyright notice in your docs 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 are licensed under CC-BY 4.0.