Jekyll + Emails

Here at we are big fans of Jekyll, the static site generator.

We recognize that many of our readers prefer to read our content via email. In order to support this we use a Jekyll theme called Loom converts our posts into HTML emails that look pretty on your little phones.

Your Jekyll site probably already has a theme so switching to Loom is a non-starter. This was the case for me so I cherry-picked the files needed from Loom to generate the email:

Our Workflow

Having installed the requirements (some Ruby, some NodeJS), a simple bash script converts your latest Jekyll post from markdown to HTML with inlined CSS.

Inlining of CSS is a critical step, as HTML emails viewed at or in your iPhone’s Mail app will not load remote CSS files.

Here is an example screenshot of this post as an email:

Example email

To generate the HTML email I ran ./scripts/, then to send it used a Python script I wrote below in combination with the Amazon Web Service command line tool (awscli):

import json

fname = '/path/to/index.html'

with open('message.json', 'w') as f:
      "Subject": {
          "Data": "Test email sent using the AWS CLI",
          "Charset": "UTF-8"
      "Body": {
          "Text": {
              "Data": "This is the message body in text format.",
              "Charset": "UTF-8"
          "Html": {
              "Data": open(fname).read(),
              "Charset": "UTF-8"
$ python
$ aws ses send-email \
  --from <my-verified-sender-address> \
  --to \
  --message file://message.json

And voila!

A few things to be mindful of:

Best of luck, I am sure you can find workflow improvements from here on out.

· jekyll, email