Project Templates

In addition to the default basic skeleton, Middleman comes with several optional project templates based on the HTML5 Boilerplate project, SMACSS, and Mobile Boilerplate. Middleman extensions (like middleman-blog) can contribute their own templates as well. Alternative templates can be accessed using the -T or --template command-line flags. For example, to start a new project based on HTML5 Boilerplate, run this command:

$ middleman init my_new_boilerplate_project --template=html5

Finally, you can create your own custom project skeletons by creating folders in the ~/.middleman/ folder. For example, I can create a folder at ~/.middleman/mobile/ and fill it with files I intend to use on mobile projects.

If you run middleman init with the help flag, you will see a list of all the possible templates it has detected:

$ middleman init --help

This will list my custom mobile framework and I can create new projects based on it as before:

$ middleman init my_new_mobile_project --template=mobile

Included Project Templates

Middleman ships with a number of basic project templates, including:

HTML5 Boilerplate

$ middleman init my_new_html5_project --template=html5

SMACSS

$ middleman init my_new_smacss_project --template=smacss

Mobile Boilerplate

$ middleman init my_new_mobile_project --template=mobile

Community Project Templates

There are also a number of community-developed project templates.