💡 Add a README

Fix #2
This commit is contained in:
Clement 2020-07-21 09:39:09 +02:00
parent c9cb7ff7db
commit 36c58d6c6e

View File

@ -1,19 +1,16 @@
# Foundation for Emails Template
# Email template for ReadLater ![Panini](https://img.shields.io/badge/language-panini-blue.svg) ![Inky](https://img.shields.io/badge/language-inky-blue.svg)
[![devDependency Status](https://david-dm.org/zurb/foundation-emails-template/dev-status.svg)](https://david-dm.org/zurb/foundation-emails-template#info=devDependencies)
> [Foundation for Emails](http://foundation.zurb.com/emails) Template
**Please open all issues with this template on the main [Foundation for Emails](http://github.com/zurb/foundation-emails/issues) repo.**
## :books: Table of Contents
This is the official starter project for [Foundation for Emails](http://foundation.zurb.com/emails), a framework for creating responsive HTML devices that work in any email client. It has a Gulp-powered build system with these features:
- [Installation](#package-installation)
- [Usage](#rocket-usage)
- [Support](#hammer_and_wrench-support)
- [Contributing](#memo-contributing)
- [License](#scroll-license)
- Handlebars HTML templates with [Panini](http://github.com/zurb/panini)
- Simplified HTML email syntax with [Inky](http://github.com/zurb/inky)
- Sass compilation
- Image compression
- Built-in BrowserSync server
- Full email inlining process
## Installation
## :package: Installation
To use this template, your computer needs [Node.js](https://nodejs.org/en/) 0.12 or greater. The template can be installed with the Foundation CLI, or downloaded and set up manually.
@ -25,30 +22,15 @@ Install the Foundation CLI with this command:
npm install foundation-cli --global
```
Use this command to set up a blank Foundation for Emails project:
### Then install this script
```bash
foundation new --framework emails
```
The CLI will prompt you to give your project a name. The template will be downloaded into a folder with this name.
### Manual Setup
To manually set up the template, first download it with Git:
```bash
git clone https://github.com/zurb/foundation-emails-template projectname
```
Then open the folder in your command line, and install the needed dependencies:
```bash
cd projectname
```sh
git clone ssh://gogs@git.shikiryu.com:2200/ReadLaterByEmail/email-template.git
cd email-template
npm install
```
## Build Commands
## :rocket: Usage
Run `npm start` to kick off the build process. A new browser tab will open with a server pointing to your project files.
@ -58,7 +40,26 @@ Run `npm run litmus` to build as above, then submit to litmus for testing. *AWS
Run `npm run mail` to build as above, then send to specified email address for testing. *SMTP server details required (config.json)*
Run `npm run zip` to build as above, then zip HTML and images for easy deployment to email marketing services.
Run `npm run zip` to build as above, then zip HTML and images for easy deployment to email marketing services.
### Details on content
* [Inky doc](https://get.foundation/emails/docs/inky.html)
* [Foundation doc](https://get.foundation/emails/docs/)
* [Blade doc](https://laravel.com/docs/7.x/blade)
As this project is used to make email sent by a Laravel app, every dynamic element must be indicated in the front-matter as such :
```
---
TITLE: "{{ $link->title }}"
---
```
and it should be in the code as such
```
{{{ TITLE }}}
```
`@if()` and all blades control structures can be used.
### Speeding Up Your Build
@ -67,7 +68,7 @@ repository. A simple way to keep it fast is to archive emails you no longer need
You can also move images that are no longer needed into `src/assets/img/archive`. The build will ignore pages and images that
are inside the archive folder.
## Litmus Tests (config.json)
### Litmus Tests (config.json)
Testing in Litmus requires the images to be hosted publicly. The provided gulp task handles this by automating hosting to an AWS S3 account. Provide your Litmus and AWS S3 account details in the `example.config.json` and then rename to `config.json`. Litmus config, and `aws.url` are required, however if you follow the [aws-sdk suggestions](http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html) you don't need to supply the AWS credentials into this JSON.
@ -128,3 +129,14 @@ For a full list of Litmus' supported test clients(applications) see their [clien
**Caution:** AWS Service Fees will result, however, are usually very low do to minimal traffic. Use at your own discretion.
## :hammer_and_wrench: Support
Please [open an issue](https://git.shikiryu.com/ReadLaterByEmail/email-template/issues/new) for support.
## :memo: Contributing
Please contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://git.shikiryu.com/ReadLaterByEmail/email-template/compare/main...main).
## :scroll: License
[Creative Commons Attribution NonCommercial (CC-BY-NC)](<https://tldrlegal.com/license/creative-commons-attribution-noncommercial-(cc-nc)>) © [Chouchen](https://github.com/Chouchen/)