Each email template is grouped by projects, and they are located under src/pages
folder.
Each project is deployed separately and has their own SendGrid accounts.
Please follow Foundation email template best practises. Read about Foundation email template here.
When target environment is staging
or production
, Handlebars variables are not replaced.
If you want a variable to be always replaced, variable should have $
prefix.
<!-- `title` is not replaced for staging and production -->
<h1>{{title}}</h1>
<!-- `$title` is always replaced -->
<h1>{{$title}}</h1>
In order to create a new template for staging and production use this command
yarn create-template
Specify the target environment in command with --env
argument. Default is local
.
When environment is not local, templates are minified and CSS styles are inlined.
# Build for staging
yarn build --env staging
# Send email with production build
yarn email --env production