Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3bb5bea

Browse files
andrewm1tchellcatarak
authored andcommitted
Issue processing#598 Add Meta to Transnational Emails (processing#634)
* Added meta tags to transactional emails * Use single quotation marks to match style * single quotes must be used * single quotes must be used
1 parent 29dde47 commit 3bb5bea

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

server/views/mail.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export const renderResetPassword = (data) => {
1212
buttonText: 'Reset password',
1313
directLinkText: 'Or copy and paste the URL into your browser:',
1414
noteText: 'If you did not request this, please ignore this email and your password will remain unchanged. Thanks for using the p5.js Web Editor!', // eslint-disable-line max-len
15+
meta: {
16+
keywords: 'p5.js, p5.js web editor, web editor, processing, code editor',
17+
description: 'A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.'
18+
}
1519
};
1620

1721
// Return MJML string
@@ -39,6 +43,10 @@ export const renderEmailConfirmation = (data) => {
3943
buttonText: 'Verify Email',
4044
directLinkText: 'Or copy and paste the URL into your browser:',
4145
noteText: 'This link is only valid for the next 24 hours. Thanks for using the p5.js Web Editor!',
46+
meta: {
47+
keywords: 'p5.js, p5.js web editor, web editor, processing, code editor',
48+
description: 'A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.'
49+
}
4250
};
4351

4452
// Return MJML string

server/views/mailLayout.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@ export default ({
77
buttonText,
88
directLinkText,
99
noteText,
10+
meta
1011
}) => (
1112
`
1213
<mjml>
14+
<mj-head>
15+
<mj-raw>
16+
<meta name="keywords" content="${meta.keywords}" />
17+
<meta name="description" content="${meta.description}" />
18+
</mj-raw>
19+
</mj-head>
1320
<mj-body>
1421
<mj-container>
1522
<mj-section>

0 commit comments

Comments
 (0)