A boilerplate project for quickly getting your RAML documentation published.
- Build tasks using Grunt
- Content assembling with Metalsmith
- Templating using Jade
- CSS-preprocessing with Stylus
- Basic styling using Twitter Bootstrap
Note that apart from Markdown support within the RAML spec it also supports
.md files that are compiled independently from the API documentation.
- Make sure Node.js is installed and in your
- Install Grunt:
npm install -g grunt-cli
- Clone the repo:
git clone https://github.com/lotaris/apidoc-seed.git
- Open the folder:
- Install dependencies:
- Run the dev server:
grunt dev --private=true
- Open a browser at
This boilerplate project documents itself. Checkout the HOWTO section at the Live Site.
If you're building for production, there are a few more options you can speficy when compiling the documentation.
Private vs. Public
It's possible to mark parts of your content as private which results being
discarded depending on how you compile the documentation. In order to build in
private mode (like the live site), use
--private=true when building. For
more information, see Private Content.
In order to build for production with assets minified, run
grunt prod --minifyAssets=true
If you're building for a different context root, run
grunt prod --minifyAssets=true --baseUrl=/foobar
You can use two different presentation for the JSON Schema representations. You can use a bordered indented schema or a border less indentation schema. For that, you can specify the option
grunt dev|prod --schemaIndentBordered=false|true
During the time you are writing the documentation, you probably want to see everything without having to click and click
again on the page. Therefore, you can use the
devMod option to collapse in all the collapsable elements. For that, use
the following option. Pay attention this option is different from
grunt dev. The dev mode can be used when building
API doc for prod.
grunt dev|prod --devMode=true|false
There are a few more Grunt tasks that can make your life easier:
grunt buildbuilds the site and exits. Assets are not minifed.
grunt servelaunches a local webserver and serves a previously built site at
MIT, see LICENSE.