This repo is a accomplishes a way to preview Foundation Emails inside of Storybook.
Like the standard foundation email project, you can use the handlebars syntax, provided by Handlebars.js to insert dynamic data into the templates as well as inject partials and run expressions.
Check out an example here!
- Clone the project.
- Open the root of the project in your terminal of choice.
- Run
yarn
to install all the dependencies. - Run
yarn storybook
to begin storybook and have a the window opened in your browser.
- Ensure all the dependencies are installed.
- Run
yarn build
and the files will be built to the/build
directory.- When built, all expressions will remain in the template so they can be replaced later on the server by only running the template through handlebars. All partials will be added and the html will be converted via Inky.