An open API service indexing awesome lists of open source software.

https://github.com/lukethacoder/gulp-email-template-builder

🏭 A small html templating engine built to make building email templates more enjoyable.
https://github.com/lukethacoder/gulp-email-template-builder

email-template email-template-builder gulp posthtml

Last synced: 3 months ago
JSON representation

🏭 A small html templating engine built to make building email templates more enjoyable.

Awesome Lists containing this project

README

        

# 🏭 Gulp Email Template Builder

A small html templating engine built to make building email templates more enjoyable.

The purpose of this small engine is to "componentise" html blocks and allow you to build reusable HTML components to be used by a suite of email templates.

Under to hood we're using [Gulp](https://gulpjs.com/), [PostHTML](https://posthtml.org/) (with [posthtml-include](https://github.com/posthtml/posthtml-include)) and [BrowserSync](https://browsersync.io/).

> Any css added to `style.css` will be pulled inline when compiled

## 🔥 Features

- HTML Components
- BrowserSync/Hot Reload
- CSS Inlining

## 🚀 Getting started

```bash
yarn
# or npm i

yarn dev
# or npm run dev
```

> NOTE: make sure you have the [Gulp cli](https://gulpjs.com/) installed.

## 🦕 Example

Included in the src folder is an example setup. All `blocks` are in a separate folder and are being referenced by the `index.html` file.

```html









```

### Pass Props to Blocks

To pass props use the `locals` props on the ``, then on the child, use `{{ VARIABLE_NAME }}`.

```html











Primary Color Goes Here




Secondary Color Goes Here

```

## 📝 License

Licensed under the [MIT License](./LICENSE).