0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
ghost/core/test/unit
Aileen Nowak 24c86b49d1 HTML newsletter template for subscribers (#7045)
refs #7023

The template can be used for all cases (different newsletter interval, different amount of blog posts, with or without blog picture).

The template can be filled with the following data structure:
- `blog.logo` is the blog logo from settings
- `blog.title` is the title of the current blog
- `blog.url` is the URL of the blog
- `blog.twitterURL` is the twitter profile URL of the blog from settings
- `blog.facebookURL` is the facebook page URL of the blog from settings
- `blog.unsubscribe` is the link for the reader to unsubscribe from the blog
- `newsletter.interval` is the interval in words like 'weekly', 'daily', 'monthly'
- `newsletter.date` is the date of the newsletter issue in a format like 'June 9th, 2016'
- `blog.post` is expected to be an array:
	- `blog.post[i].picture` is the picture of the blog post. There are also conditionals, which change the inline CSS to either show a border-top if there's no picture (in that case the HTML code, that shows the picture is not active)
	- `blog.post[i].title` is the title of the current blog post
	- `blog.post[i].text` is the text of the current blog post, which needs to be cut down to 278 letters, plus ending with `…`
	- `blog.post[i].url` is the URL of the current blog post
	- `blog.post[i].tag` is the tag of the current blog post
	- `blog.post[i].author` is the author of the current blog post

Important is, that only HEX HTML entities will work, especially in Outlook. So instead of `—` we need to use `—` and `’` instead of `'` or `'` and so on.

Added unit test for newsletter template in `test/unit/mail/utils_spec.js`.
2016-07-08 21:40:32 -06:00
..
api improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
controllers/frontend improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
mail HTML newsletter template for subscribers (#7045) 2016-07-08 21:40:32 -06:00
metadata fix(twitter-card): use proper image tag (#7025) 2016-06-29 18:04:43 -06:00
middleware allow manifest.json in theme root (#6986) 2016-06-29 14:44:01 -06:00
models/base improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
models_plugins improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
scheduling post-scheduling: delete job but time is null (#7035) 2016-06-28 20:14:29 +02:00
server_helpers fix(twitter-card): use proper image tag (#7025) 2016-06-29 18:04:43 -06:00
utils improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
api_utils_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
apps_filters_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
apps_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
config_spec.js fix: url for post path when post is not published 2016-06-20 14:48:01 +02:00
error_handling_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
exporter_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
filters_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
ghost_url_spec.js ensure null query options don't break ghost-url 2016-02-29 00:25:38 -06:00
importer_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
migration_fixture_spec.js deps: bookshelf@lodash-upgrade-fix 2016-06-27 08:22:30 -06:00
migration_fixture_utils_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
migration_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
permissions_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
rss_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
server_helpers_index_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
server_helpers_template_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
server_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
server_utils_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
showdown_client_integrated_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
sitemap_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
slack_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
social-urls_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
storage_local-file-store_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
utils_pipeline_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
versioning_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
xmlrpc_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00