mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Added style inlining to staff service emails
no issue - uses same `juice` version that we use in our newsletter emails
This commit is contained in:
parent
e41984d0a5
commit
0647172ca8
2 changed files with 9 additions and 4 deletions
|
@ -495,10 +495,14 @@ class StaffServiceEmails {
|
|||
sharedData = await this.getSharedData(data.recipient);
|
||||
}
|
||||
|
||||
return htmlTemplate({
|
||||
const html = htmlTemplate({
|
||||
...data,
|
||||
...sharedData
|
||||
});
|
||||
|
||||
const juice = require('juice');
|
||||
|
||||
return juice(html, {inlinePseudoElements: true, removeStyleTags: true});
|
||||
}
|
||||
|
||||
async renderText(templateName, data) {
|
||||
|
|
|
@ -23,9 +23,10 @@
|
|||
"sinon": "15.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": "4.17.21",
|
||||
"moment": "2.29.1",
|
||||
"@tryghost/email-addresses": "0.0.0",
|
||||
"handlebars": "4.7.8",
|
||||
"@tryghost/email-addresses": "0.0.0"
|
||||
"juice": "9.1.0",
|
||||
"lodash": "4.17.21",
|
||||
"moment": "2.29.1"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue