pandoc-seed-project
Seed git repo for pandoc based projects. Just clone and pandoc.
Inspired by projects like ultimate-seed and angular-seed. This seed aims to include necessary tools/scripts to automate pandoc compilation.
With this seed, you should be able to:
- Write documents in whatever input format pandoc supports.
- Use gulp.js to automatically compile documents.
Repeat as necessary.
Prerequisites
- node.js and npm
- pandoc (and the haskell-platform)
- some knowledge of streams:
Included
- gulp - build system (task automation)
- gulp-spawn-shim - shim node.js child_process.spawn() to gulp.js
- gulp-util - utility belt for gulpfile.js
- gulp-plumber - monkey-patch Stream.pipe
- gulp-watch - watch files
- gulp-rename - rename files
- gulp-livereload - automatically reload compiled documents (HTML only)
- gulp-ignore - conditionally include/exclude files
- tiny-lr - tiny livereload
gulpfile.js
The rules for how to compile pandoc documents are configured from within the gulpfile.js file.
Generally, gulp will take **/*.md
files (configurable) from src_docs
folder, compile via pandoc, and then place the resulting files into dest_docs
folder in the same directory structure as it was placed in src_docs
.
Note
I'm currently using this setup for my personal pandoc project; mainly for my markdown documents. It can be set up generally as pandoc allows.
The gulpfile.js file I provided is set up for additional support of MathJax from mathjax-lazyload. It's supported for HTML generated pages with a lot of math (LaTeX) elements.
In the future, I'll provide variations of gulpfile.js.
This project replaces/deprecates grunt-pandoc; a workflow I used to use.