Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Simple and extensible static site generator powered by Grunt

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Cabin Beta

Simple and extensible static site generator powered by Grunt.

NPM version
Dependency Status
Travis Status

Getting Started

To use Cabin you must have Node.js, Git, Python (for Pygments), Ruby, and Compass installed.

Get started by using npm to install Cabin and Grunt globally with the following command:

npm install -g cabin grunt-cli

You can then scaffold a static generator with the following command:

cabin new myBlog colinwren/Candy

The first parameter is the name of the destination folder, and the second is the GitHub username and repository name of a theme to use for the site. If the theme parameter is left blank, the default theme will be used.

After scaffolding a site generator, you can run it by entering the project directory and running grunt with this command:

cd myBlog && grunt

This will build your site, start a static file server, open a browser tab with the site's homepage, and start a watch process to rebuild your site when your source files change. Try editing or creating a new markdown file in the posts folder (if you are using the default theme) and upon save your site will be automatically rebuilt. When your site has been rebuilt, your browser will automatically refresh with your updated site.


Cabin themes provide styling and structure for your static site project. They work great out of the box and as starting points for more customized sites.

Featured themes


Candy theme


Blok theme

Creating Themes


The only file explicitly required is a cabin.json configuration in the root of the repo. This file describes what CSS preprocessors and template languages that your theme supports as well as the configuration for grunt-pages. We currently support EJS and Jade templates and the Sass and LESS style languages.

Here is an example cabin.json file which states that the project supports Sass, Jade, and has the specified config for the ~0.4.0 version of the grunt-pages task:

  "style": [
  "template": [
  "gruntPagesVersion": "~0.4.0",
  "gruntPages": {
    "posts": {
      "src": "posts",
      "dest": "dist",
      "layout": "src/layouts/post.jade",
      "url": "blog/posts/:title/"

Note: the configuration of the cabin.json must have dist as the destination folder and the theme files must match the folder structure described below.

Theme file locations

Your theme must conform to the following folder structure in order to work with the Gruntfile that Cabin generates.

├── cabin.json
├── posts
│   └── Sample posts
├── dist
│   └── Generated site files
└── src
    ├── images
    │   └── Theme image files
    ├── layouts
    │   └── Theme layout templates
    ├── pages
    │   └── Theme page templates
    └── styles
        └── Theme stylesheets

Testing a theme

To test your theme, run Cabin with the -l flag. For example if you had a theme in a folder called themeFolder and you wanted to make sure it was working properly, you would run the following command to install it locally:

cabin new site themeFolder -l

Then you would run the following command to make sure the theme will work as expected for users once installed:

cd site && grunt

To see an example theme repo, check out the default theme.


0.1.5 - Have cabin new download theme's master branch instead of default branch

0.1.4 - Added -l flag to test local themes during development. Slimmed down generated Gruntfile.

0.1.3 - Use as hostname for mobile debugging. Removed extra whitespace and connect folder from generated Gruntfile. Added gruntPagesVersion to cabin.json config.

0.1.2 - Built-in LiveReload functionality added.

0.1.1 - The Gruntfile now copies fonts from the src/styles/fonts folder.

0.1.0 - grunt server is now the default task. The Gruntfile template now copys images, vanilla css, and scripts and no longer copies .ico and .htaccess files.

0.0.2 - Use git clone instead of downloading theme zips from GitHub repos.

0.0.1 - Only copy specified file extensions from themes.

0.0.0 - Initial push.

Something went wrong with that request. Please try again.