When comparing DocPad vs Roots, the Slant community recommends DocPad for most people. In the question“What are the best static site generators?” DocPad is ranked 6th while Roots is ranked 18th. The most important reason people chose DocPad is:
DocPad is published as an NPM module which makes it easy to integrate with an existing Node.js deployment.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Built on Node
DocPad is published as an NPM module which makes it easy to integrate with an existing Node.js deployment.
Pro Has an active plug-in ecosystem
DocPad's has a large amount of plug-ins available to extend its functionality and compatibility with other language preprocessors and markup languages.
- Javascript preprocessors include: Coffescript, TypeScript, and LiveScript.
- CSS preprocessors include: LESS, SASS, Stylus, and Roole
- HTML markups include: Markdown, and Textile
- Templating engines include: Eco, Handlebars, Moustache, HAML, CoffeeKup, Jade, and Teacup
- JSON converters include: YAML and CSON
Pro Has Live Reload
DocPad has a Live Reload plug-in that leverages websockets to automatically update the blog content for users live on the site.
Pro Built on top of the Express framework
Although DocPad is a static site generator, if you find the need to, you can extend the site with the Express framework for dynamic content as well.
Pro Has graphical admin interfaces for managing your blog
There are multiple custom interfaces, including miniCMS available to DocPad which provide WYSIWYG editing and article management.
Pro Easy to deploy
Deployment plug-ins make deploying to hosting providers even easier, with plug-ins for GitHub Pages, AWS, and Google Storage.
Pro MIT-licensed
Pro Prebuilt Skeletons
Skeletons are boilerplate setups to provide a baseline structure for you to fill content into.
Pro Document and file querying with Query Engine
DocPad leverages Query Engine to provide a query API for querying files.
Pro Active development
Roots has heavy corporate sponsorship and is worked on very actively as a full time job. That means you can rely on it.
Pro Quick deploys
You can deploy to heroku, github pages, s3, etc. with a single command.
Pro Dynamic content
Roots supports dynamic content like jekyll for every compiler and language.
Pro Currently going through an upgrade
Roots is currently in the process examining how to leverage newer technologies to make Roots even better. You can see the new project on github: https://github.com/carrot/roots-mini
Here is the blog post explaining the next phase of Roots: https://medium.com/@jescalan/eaa10c75eb22#.uacjziaej
Here is the stack they're experimenting with:
- jade - for markup
- babel - for JS and JS transforms
- postcss - for CSS transforms
- webpack - as the core compiler
As this is a work in process, it just means the future of Roots continues to look great.
Pro Custom compilers
Not only does roots support a huge number of languages and compilers out of the box, it also allows you to insert custom compilers if you want. Fun fact, roots is the only static site generator that supports dogescript
Pro Multipass compiles
Roots compiles files once for each extension, which allows for some advanced options if you get to that stage
Pro Client-side templates
Roots will precompile your templates into js, which makes it really smooth to work with client-side MV* frameworks.
Pro Quick
Since roots is written in node, everything is compiled in parallel rather than in series, making it very quick.
Cons
Con Support for Handlebars templates is not mature - integration is awkward
Handlebars' philosophy of "no logic in templates" makes some things difficult:
- DocPad built-in template helpers aren't available by default - they have to be manually added/exposed
- DocPad's example template code often includes logic, which makes it impossible to use within Handlebars templates -- it has to be abstracted into custom helper functions.
- Can't pass objects to function calls from within HB templates.
Con More up-front investment to learn/use well
DocPad provides a LOT of extensibility and dynamic capability, which means there's more up-front investment to learn DocPad well -- and deviating from the defaults while maintaining project robustness may be difficult.
Con Written in CoffeeScript (which could be a Pro depending on your preference)
Con Code samples in Documentation and any online Q&As are in CoffeeScript only (no JavaScript samples available)
Con The default template engine (Eco) only supports CoffeeScript, not JavaScript
Con The default template engine (Eco) does not support multi-line code tags
Con No i18n (Internationalization)
There is no i18n support out of the box. And there is only one extension that does i18n compilation with a limited feature set.