This example document shows multiple features of Documark.
-
Make sure you have NodeJS and wkhtmltopdf installed.
-
Install Documark:
npm install -g documark-cli. -
Compile this document. In your command-line, run:
git clone https://github.com/documark/documark-example cd documark-example npm install documark compile -
Finally, open
Document.pdffor the result:open Document.pdf # in Mac OS X
See Example.pdf for the final result!
These are the things you need to know in order to get started:
-
The
document.jadefile is compile. In here you can define your structure, add your configuration, and include Jade/Markdown files. -
Assets are resolved from the directory where your
document.jadefile is in.This means that if you have an image in
./assets/img/kitteh.pngand want to add it in./chapters/intro.md, you can do this with(instead of../assets/img/kitteh.png).Also see the
dmp-relative-pathsplugin. -
Writing your own plugins is super easy:
- Create a file
plugins/my-plugin/index.js. - Add
plugin my-pluginto yourdocument.jade. - Use the plugin template for your
index.jsfile.
- Create a file
Information about the build/compilation process can be found here.
Please use the Github issues to ask questions or get help.
Good luck and feedback is appreciated!
Documark plugin packages start with dmp- and can be found on NPM.