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.pdf
for 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.jade
file 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.jade
file is in.This means that if you have an image in
./assets/img/kitteh.png
and want to add it in./chapters/intro.md
, you can do this with
(instead of../assets/img/kitteh.png
).Also see the
dmp-relative-paths
plugin. -
Writing your own plugins is super easy:
- Create a file
plugins/my-plugin/index.js
. - Add
plugin my-plugin
to yourdocument.jade
. - Use the plugin template for your
index.js
file.
- 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.