Espresso

Dynamo

Topics

Syntax

Mixins

Dynamo provides the flexibility of a dynamic website with the speed and security of statically hosted files. You can use it for something as simple as generating CSS from SCSS, or as complex as generating a blog from Markdown files.

Dynamo supports templates, variables, and reusable code fragments for HTML along with built-in parsing for SCSS, LESS, Markdown, and CoffeeScript.

To enable Dynamo for a particular folder, add an .esdynamo file extension to the folder; for instance, a folder containing SCSS files named css.esdynamo will cause Dynamo to generate a folder named css containing the processed CSS files.

You can also turn Dynamo on and off for a folder from the project's Dashboard: select the folder in the sidebar and click the Dynamo button on the Dashboard in the main portion of the window.

When a project has Dynamo folders, a Dynamo button appears beside the Project heading in the sidebar. It says when Dynamo is building, and counts the errors, warnings and to-do notes it found; click it for a list of them, each of which takes you to the place it is about, and for Rebuild All.

To process a folder with a generator, create a file named _mixins.json within the folder with the following contents:

{
    "generator": "MixinName"
}

Please note: generators are currently considered a beta feature; the API and specific features available are still in flux, so please be careful about using them for mission critical projects.

Parsed files

When Dynamo is enabled for a project or folder, it will parse the following types of files:

HTML and Markdown files support a special comment-based Dynamo syntax (fuzzy paths, variables, etc.). All other files will be copied to the built site without being modified.

If you wish to exclude a file or folder from being copied to the built site, prefix its name with an underscore:

_ignoredFile.html