diff --git a/ghost/staff-service/lib/email-templates/mention-report.hbs b/ghost/staff-service/lib/email-templates/mention-report.hbs new file mode 100644 index 0000000000..98bd233a70 --- /dev/null +++ b/ghost/staff-service/lib/email-templates/mention-report.hbs @@ -0,0 +1,136 @@ + + + + + + 💌 New mention{{#eq report.mentions.length 1}}{{else}}{{report.mentions.length}}s{{/eq}} + {{> styles}} + + + + + + + + + +
  +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + +
+

Hey there,

+

{{siteTitle}} was mentioned{{#eq report.mentions.length 1}} in:{{else}} {{report.mentions.length}} times recently. Here's where:{{/eq}}

+ + {{#each (limit report.mentions 5) as |mention|}} + +
+ +
+
{{mention.sourceTitle}}
+
{{mention.sourceExcerpt}}
+
+ {{#if mention.sourceFavicon}}{{/if}} + {{#if mention.sourceSiteTitle}}{{mention.sourceSiteTitle}}{{/if}} +
+
+ {{#if mention.sourceFeaturedImage}} +
+ +
+ {{/if}} +
+
+ + + + + {{/each}} + + + + + + + +
+ + + + + + +
View all {{#if hasMoreMentions}}{{report.mentions.length}}{{/if}} mentions
+
+
+

You can also copy & paste this URL into your browser:

+ +
+

This message was sent from {{siteDomain}} to {{toEmail}}

+
+

Don’t want to receive these emails? Manage your preferences here.

+
+
+ + + +
+
 
+ + diff --git a/ghost/staff-service/lib/email-templates/mention-report.txt.js b/ghost/staff-service/lib/email-templates/mention-report.txt.js new file mode 100644 index 0000000000..042bb0666d --- /dev/null +++ b/ghost/staff-service/lib/email-templates/mention-report.txt.js @@ -0,0 +1,11 @@ +module.exports = function (data) { + // Be careful when you indent the email, because whitespaces are visible in emails! + return ` + You have been mentioned by ${data.sourceUrl}. + +--- + +Sent to ${data.toEmail} from ${data.siteDomain}. +If you would no longer like to receive these notifications you can adjust your settings at ${data.staffUrl}. + `; +};