Templates
A template is a folder of files to start from. Espresso uses templates in two places:
- File ⟩ New Project… (shift command N) offers the templates that can start a project
- File ⟩ Actions ⟩ New From Template…, and the Templates button on a project's Dashboard, offer the templates that can add files or a folder to the project you have open. What they make is put in the folder that is selected.
Espresso comes with two:
- Choose Empty / Existing Folder starts a project with what you already have, or with a perfectly clean slate
- HTML5 Boilerplate starts one from the HTML5 Boilerplate, and asks which of its parts you want first
Making your own templates
Your own templates live in:
~/Library/Application Support/Espresso/Templates/
Choose Show Templates Folder where templates are listed to open that folder in the Finder. The first time, Espresso puts an example template there for you to look at.
A template is simply a folder whose name ends in .espressotemplate. Put in it the files and folders that you want to start with. That is all a template needs.
To say more about your template, add a file named _espresso.json to it:
{
"name": "Client Site",
"description": "Our starting point for a brochure site.",
"context": "new-project, new-folder, add-to-folder"
}
nameis what the template is called in Espresso, in place of the folder's namedescriptionis a line shown under the namecontextsays where the template is offered:new-projectfor a new project,new-folderfor a new folder in a project, andadd-to-folderfor adding its files to a folder that is already there. Give one or several, separated by commas, or*for everywhere.