Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
avigoldman committed Oct 26, 2017
1 parent 14470ca commit 9dd9e69
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 45 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
build/
.env
*.log
testing/
63 changes: 18 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# HEML

<p align="center">
<a href="https://heml.io/docs/getting-started/guide">Guide</a> &bull;
<a href="https://heml.io/docs">Documentation</a> &bull;
<a href="https://heml.io/editor">Editor</a>
</p>


HEML is an open source markup language for building responsive email.

- **Native Feel:** Do you know HTML and CSS? Check out our docs and you're off to the races! No special rules or styling paradigms to master.
Expand All @@ -9,58 +16,24 @@ HEML is an open source markup language for building responsive email.
- **Extendable:** You can create your own powerful elements and style rules. Share them with the world, or keep em to yourself. Your choice.


##### [Try it out!](https://heml.io/editor)


## Table of Contents
* [Getting Started](https://heml.io/docs/getting-started)
* [Email Structure](https://heml.io/docs/email-structure)
* [Styling](https://heml.io/docs/styling)
* [Elements](https://heml.io/docs/elements)

## FAQ

## Code with HEML
### Why should I use HEML?

To use HEML in your node project, install it with:
It makes building emails easier.

```sh
npm install heml --save
```
### How do I use it?

In your code, pull the package in. It takes two parameters: the HEML you want to convert and any custom options you have defined. Once finished, HEML will return a Promise with an object containing the generated HTML and any metadata collected. If `validate` is set to `soft`, an array of any errors will also be included.
Check out our [usage guide](http://heml.io/docs/getting-started/usage).

```js
const HEML = require('heml')
### What do I if I found a bug?

HEML(`
<heml>
<head>
<subject>My email</subject>
</head>
<body>
<h1>Hi there!</h1>
</body>
</heml>
`, {
validate: 'soft'
})
.then(({ metadata, html, errors }) => {
console.log(html)
})
Open up an [issue](https://github.com/SparkPost/heml/issues) on the repository. Thanks for catching it! 🙏

```
### Want to help?

Awesome!! We welcome any and all help! Head over to the [issues](https://github.com/SparkPost/heml/issues) and see if anything catches your eye.

### Options
## License

```js
{
validate: 'strict'|'soft'|'none', // defaults to 'soft'
cheerio: {} // config passed to cheerio parser
juice: {},
beautify: {} // config passed to js-beautify html method
elements: [
// any custom elements you want to use
]
}
```
[MIT](https://github.com/SparkPost/heml/blob/master/LICENSE)

0 comments on commit 9dd9e69

Please sign in to comment.