Docpad is a open source static document/website generator written in Node.js, Docpad lets you choose the way it builds static documentation/website with the help of plugins, Docpad has a build in plugin manager that uses NPM to install
node modules that are used by Docpad and required by plugins as dependencies, Some plugin makes Docpad a really good choice if you are planning to choose Node.js based mediums to build your website, plugins like marked which is a markdown interpreter let you write your pages in markdown, Docpad also lets you choose the templating engine, If you prefer Jade you can use Jade to template, If you prefer Eco a recommended templating engine by Docpad developer, you can go ahead or if you like Handlebars you can go ahead and install that plugin and start templating in Handlebars.
Docpad main configuration file is written in Coffee Script. Docpad lets you set collections that can be listed so your can build multi-blog site using Docpad.
Since Docpad is written in Node.js and is a NPM module that can be installed as a global package on your system. It’s really easy to install Docpad on Raspberry Pi.
Lets get started.
- Installing Node.js on our Raspberry Pi here, if you already have Node.js installed on your system you can skip this step.
npm install docpad -g
Once you have successfully installed Docpad you can go ahead and run
docpad run will list the skeletons available for create a website.
You can choose no skeleton if you want to build your Docpad project from scratch.
Plugins can be installed by running
# example `docpad install marked`
Now you Raspberry Pi has been turned into a static website generator. If you have any questions feel free to leave a comment below.