My first Experience with DocPad and Node.js

UPDATE: I moved from DocPad to Hugo, but the reasoning is still valid.

I was looking for ways to speed up my website, and short of upgrading the package with my hosting company it was going to be tough. My site was running on the back of Wordpress for quite some time and it was great. Wordpress gained momentous traction within the internet communities as a quick way to get a blog up and running.

The problem for me is that the PHP sessions that are created can tax the server of my shared hosting, and occasionally additional requests can peak the memory allowance. This results in the occasional HTTP 503 - not good. When the server is running smoothly the amount of time to render a Wordpress page (with plugins) can already take some time. Google Analytics gives an average page load time 5.62s.

I have tried to alleviate this in the past by using a Wordpress cache tool called W3 Total Cache - which works. However during cache creation it also causes the occasional HTTP 503.

The Thinking

Maybe I don’t need all of the features of Wordpress. I don’t need the web server to do anything more than serve the pages that I create. So why not generate the page once and be done with it. Well there will be issues with navigation and sitemaps if those pages aren’t updated overtime a new page is added. Naturally I don’t want to hand author every page that has altered either, so I set about looking for a static site framework, or generation tool.

I’m a programmer at heart, so I am quite capable of putting a little bit of extra work - maybe I could set up a local PHP / MySQL server and use Wordpress as a generation tool, and then upload the generated pages - that could be difficult to maintain, with some pages not required in a static environment.

So I found DocPad an OpenSource project running on Node.js. Although the project hits all of the current Buzzwords it matches what I need.

What do I need?

DocPad is very lightweight to start with. Basic setup allows for basic server setup and file watching, but it is ready for Plugins/Modules galore. There are some skeletons available to get started, but I like reinventing the wheel so I start with a blank slate - and go browsing the plugin list.

I recommend getting involved, download Node.js, and Install DocPad give it a try.


It did not take too much time to reconstruct my website from the ground up, and DocPad and Plugins were very accomodating. Only time will determine if it was a good idea to make the change - but for now I am happy with what I have done.

comments powered by Disqus