chore: fix typos
This commit is contained in:
parent
8c8ad36f4a
commit
1c0c9b9686
17
README.md
17
README.md
|
@ -5,8 +5,8 @@
|
||||||
[![Go Coverage](https://codecov.io/github/matcornic/hermes/coverage.svg)](https://codecov.io/github/matcornic/hermes/)
|
[![Go Coverage](https://codecov.io/github/matcornic/hermes/coverage.svg)](https://codecov.io/github/matcornic/hermes/)
|
||||||
[![Godoc](https://godoc.org/github.com/matcornic/hermes?status.svg)](https://godoc.org/github.com/matcornic/hermes)
|
[![Godoc](https://godoc.org/github.com/matcornic/hermes?status.svg)](https://godoc.org/github.com/matcornic/hermes)
|
||||||
|
|
||||||
Hermes is the Go port of the great [mailgen](https://github.com/eladnava/mailgen) engine for Node.js. Check their work, it's awesome !
|
Hermes is the Go port of the great [mailgen](https://github.com/eladnava/mailgen) engine for Node.js. Check their work, it's awesome!
|
||||||
It's a package that generates clean, responsive HTML e-mails for sending transactional e-mails (welcome e-mail, reset password e-mails, receipt e-mails and so on).
|
It's a package that generates clean, responsive HTML e-mails for sending transactional e-mails (welcome e-mails, reset password e-mails, receipt e-mails and so on).
|
||||||
|
|
||||||
# Demo
|
# Demo
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ h := hermes.Hermes{
|
||||||
// Appears in header & footer of e-mails
|
// Appears in header & footer of e-mails
|
||||||
Name: "Hermes",
|
Name: "Hermes",
|
||||||
Link: "https://example-hermes.com/",
|
Link: "https://example-hermes.com/",
|
||||||
//Option product logo
|
// Option product logo
|
||||||
//Logo: "http://www.duchess-france.org/wp-content/uploads/2016/01/gopher.png",
|
// Logo: "http://www.duchess-france.org/wp-content/uploads/2016/01/gopher.png",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -62,7 +62,7 @@ email := hermes.Email{
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate an HTML email with the provided contents(for modern clients)
|
// Generate an HTML email with the provided contents (for modern clients)
|
||||||
emailBody, err := h.GenerateHTML(email)
|
emailBody, err := h.GenerateHTML(email)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err) // Tip: Handle error with something else than a panic ;)
|
panic(err) // Tip: Handle error with something else than a panic ;)
|
||||||
|
@ -74,7 +74,7 @@ if err != nil {
|
||||||
panic(err) // Tip: Handle error with something else than a panic ;)
|
panic(err) // Tip: Handle error with something else than a panic ;)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optionnaly, preview the generated HTML e-mail by writing it to a local file
|
// Optionally, preview the generated HTML e-mail by writing it to a local file
|
||||||
err = ioutil.WriteFile("preview.html", []byte(emailBody), 0644)
|
err = ioutil.WriteFile("preview.html", []byte(emailBody), 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err) // Tip: Handle error with something else than a panic ;)
|
panic(err) // Tip: Handle error with something else than a panic ;)
|
||||||
|
@ -129,13 +129,13 @@ h := hermes.Hermes {
|
||||||
|
|
||||||
## Language Customizations
|
## Language Customizations
|
||||||
|
|
||||||
To customize the e-mail greeting (Hi) or signature (Yours truly), supply custom strings within the e-mail `Body`:
|
To customize the e-mail's greeting ("Hi") or signature ("Yours truly"), supply custom strings within the e-mail's `Body`:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
email := hermes.Email{
|
email := hermes.Email{
|
||||||
Body: hermes.Body{
|
Body: hermes.Body{
|
||||||
Greeting: "Dear",
|
Greeting: "Dear",
|
||||||
Signature: "Sincerly",
|
Signature: "Sincerely",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -176,7 +176,6 @@ Hermes supports injecting custom elements such as dictionaries, tables and actio
|
||||||
|
|
||||||
To inject an action button in to the e-mail, supply the `Actions` object as follows:
|
To inject an action button in to the e-mail, supply the `Actions` object as follows:
|
||||||
|
|
||||||
|
|
||||||
```go
|
```go
|
||||||
email := hermes.Email{
|
email := hermes.Email{
|
||||||
Body: hermes.Body{
|
Body: hermes.Body{
|
||||||
|
|
Loading…
Reference in New Issue