raml2html-full-markdown-theme
Render the RAML API spec in the slate documentation layout using raml2html
This package provides a theme for raml2html. It is meant to render a Markdown documentation for your REST API, based on a RAML file. The theme is based on the code of raml2html-slate-theme.
The theme supports customizable templates. The default template is most suitable to use with Slate. You can also find some alternative templates in the alternative_templates folder. You will need to copy them into your project directory and use template-dir
option.
The theme is called full Markdown theme because it includes much more fields from the RAML specification than the original raml2html-markdown-theme.
Installation
$ npm install -g raml2html-full-markdown-theme
Usage
In javascript:
const raml2html = ;const options = 'template-dir': 'templates'const mdConfig = raml2html; // source can be a filename, url or parsed RAML objectconst source = 'path/to/raml/file'raml2html
On the command line:
raml2html \--theme 'raml2html-full-markdown-theme' \-o 'path/to/output/file.md' \-i 'path/to/raml/file.raml' \--template-dir 'templates'
Options
- --template-dir The path to custom templates directory. If omitted — the default template is used.