When comparing DocPad vs Middleman, the Slant community recommends Middleman for most people. In the question“What are the best static site generators?” Middleman is ranked 3rd while DocPad is ranked 6th. The most important reason people chose Middleman is:
[Minification and compression](http://middlemanapp.com/advanced/file-size-optimization/index.html) are as easy as setting a few configuration options, and [unique asset hashes](http://middlemanapp.com/advanced/improving-cacheability/) are available to allow you to invalidate the cache of files that change regularly.
Ranked in these QuestionsQuestion Ranking
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.
- 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 Easy to deploy
Deployment plug-ins make deploying to hosting providers even easier, with plug-ins for GitHub Pages, AWS, and Google Storage.
Pro Prebuilt Skeletons
Skeletons are boilerplate setups to provide a baseline structure for you to fill content into.
Pro Support for a variety of templating languages and preprocessors
Middleman supports lots of compiled languages, such as Less, Markdown, Textile, CoffeeScript, Stylus and more.
Pro Extensible and flexible
Middleman has a resources page full of official and community extensions.
Pro External pipeline management with Webpack
Replace your Gulp, Grunt, Bower configs
Pro Embraces Rails conventions
Middleman follows established conventions so if you know rails, you can easily pick up middleman.
Pro Easy deployment options
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 The default template engine (Eco) does not support multi-line code tags
Con A little more complicated than other static site generators
Middleman is a big piece of software, it's not simply a static blog generator. Because of all the functionality and flexibility it offers it can be a little more complex than other static site generators and a little harder to learn all of its bells and whistles.