Introduction

Last updated 12 days ago
Watch the talk that launched DocPad into publicity

What is DocPad?

DocPad is a dynamic static-site generator. That is a content management system that takes content from several sources, like files on your computer, and renders them into incredibly fast static output. DocPad's dynamic abilities allows you to pull in data from several sources, re-render when changes occur, and even add dynamic things like contact forms or admin interfaces to your website if desired. DocPad is the ideal choice offering an intuitive rapid web development experience for building web application front-ends and for building websites which content changes a max of once per hour.

Problems with Traditional Web Architectures

Despite all the amazing wonder of current web application architectures, they're mostly:

  • Inherently slow

    • Usually built on blocking, live-then-die platforms

    • Performance is an afterthought, re-render every single time (by default, caching can be enabled to improve this)

  • Bloated

    • Huge, include-everything codebase, with little or no code re-use (especially between frameworks)

    • Overkill for everything, as no single project will use every feature of the CMS

  • Complex

    • Gigantic learning curves, usually measured in months (instead of days or hours)

    • You require CMS/framework developers instead of web developers

  • Difficult

    • Setting up a new website is time-consuming and complex

    • Uh oh! "database not installed" or "version invalid"

    • Migrations and deployments are a royal pain in the ass

  • Limited

    • WYSIWYG editors are sucky and stupid - why re-invent the wheel? We're already trained with and love our desktop counterparts (Sublime Text, Vim, Byword, etc.)

    • Abstractions on the go? Forget it - you're boxed in, unless you've got a machete

    • Want to use your own pre-processors, markups, and templating engines? Tough: they're handled by the core.

DocPad, a dynamic static-site generator

On the other hand, let's compare that with DocPad, which is:

  • Website inherently fast

    • Built on a non-blocking, stay-alive platform

    • Performance from the ground up, re-render only when changes occur (by default, can be configured differently)

  • Lightweight

    • Tiny core, with anything that's re-usable abstracted out into modules that other systems can use

    • All non-essential core functionality lives in opt-in plugins

  • Simple

    • Tiny learning curve; get started in minutes, become a pro in days

    • Web developers already have everything they need to get started

  • Easy

    • Setting up a new website can be done in minutes

    • In-memory database provides querying without the need for a manual installation

    • Migrations and deployments are handled via Git, the tool we are used to

  • Robust

    • Use your desktop counterparts to edit content naturally (Sublime Text, Vim, Byword, etc.)

    • Abstraction friendly; code the way you want, how you want

    • Use whatever language, pre-processor, markup, templating engine you want - it's all covered via our opt-in plugins (and if it isn't, it's very easy to add)

Besides this, thanks to the opt-in modular philosophy of Node, we benefit from all the innovations of the community as a whole, including:

So as the Node community grows and innovates, so do we. Awesome.

Comparison Table

For those who like tables, here's the above in table form:

Feature

Usual CMS

Usual Static Site Generator

DocPad

Talent requirements

CMS developer

Backend+frontend developer

Frontend developer

Developers proficient in

Months

Days

Days

Plugin and extension system

Yes

No

Yes

Asset pipeline

No

Implicit & bundled

Explicit & extendable

Markup languages (markdown, rst, etc.)

No

1 bundled

Via plugins

Pre-processors (sass, less, etc.)

No

No

Via plugins

Template engines (eco, jade, etc.)

No

1 bundled

Via plugins

Database querying

Yes

No

Via Query-Engine

Layouts

Yes

Yes

Yes

Static website output

No

Yes

Yes

Re-render each request

Always

No

Deprecated

Extend the web server

Yes

No

Via events and API

Watching

N/A

Yes

Yes

Differential regenerations

N/A

No

Yes

Live-reload

No

No

Via livereload plugin

Partials

No

No

Via partials plugin

Manual database installation required

Yes

No

No

Import pages from file system

No

Yes

Yes

Import pages from external database (MongoDB, MySQL, etc.)

Yes

No

Deprecated

Import pages from external services (Tumblr, Dropbox, GitHub, etc.)

No

No

Deprecated

Import data from external services (Atom, XML, JSON, etc.)

No

No

Via feedr plugin

WYSIWYG editors

Yes

No

Deprecated