HTML Email Development with Jekyll – Auto Inline CSS

Inlining CSS on HTML Emails is a pain point for anyone, it’s just hard, easy to miss things, hard to maintain, and just tiresome. There are some great tools out there that help do this for you, like this CSS Inliner Tool.

If you dig a little deeper, you’ll probably find a library called Premailer which does the same thing but allows you to install it on your own server and integrate it into your workflow.

For static pages, I’m using Gh-pages, hosted free by github and also using Jekyll templates to automatically generate my files – really great tool for maintaining a static site.

So, how does someone use static pages on gh-pages and Premailer together to maintain some HTML email templates?

All of these instructions you’ve already installed and are using Jekyll, learn more.

Step 1 – gem install premailer

Step 2 – Create a new directory called _plugins inside your repo

Step 3 – Use the Gist below to create a new plugin for Premailer

Step 4 – Config premailer.rb. You’ll want to rename the layout and CSS file name to the one you’re project has.

That’s it! Right now Jekyll Plugins can’t be used on Gh-pages but you can copy the generated files from your local to your email tool or app that you’re working on. With some cleanup we might even be able to get this plugin supported on Gh-pages.

Learning

I dont blog on here much about my job and experience in software engineering but I think it’s time that I start. A couple years ago I was asked to manage and develop our own in house software engineering team. At the time my company had always outsourced development and infrastructure management for it’s first 3 years. As we grew and learned, it was obvious that we were repeating the same cycles over and over again and it wasn’t working. I guess you could say it was time to do it right.

Myself, being an eager go-get-er accepted the position and jump in head first to a world of software engineering that I really didnt fully understand yet and my Leo Type A personality started making waves. My first few weeks we’re rough, I did everything wrong and made all of the wrong decisions. At the time we had a small Scrum team that was quite young and a Scum Master who really was trying to juggle leading software engineering and being the Scrum Master as the same time – really tough to do. Needless to say, it was a bit of a rocky start.

A month or two into my new role I had a break, I finally got on the same playing field and communication plane as our Scrum Master. I look back on this moment or course of a few weeks where we started working together that I think it changed me on a personal level and was the beginning of a new chapter in my career. Looking back, up until that point in time I had been a really poor communicator to my team, and this was my biggest weakness as a manager. I did everything wrong in terms of communication. If you asked me the biggest thing I changed, I stopped sending emails to my team. OK, I still send some emails now and then for updates on things, but important communication and things that people need to know or give input on I started talking.

In the coming months and year, I found a whole new side of building relationships and trust with my team. I dont think that I could do justice to all of the things that this change did for me, all I can say is that it totally changed the game. It was tough in the beginning for sure but over time its paid off and I think made me more effective as a leader of my team.

Blogging more often It’s hard to take the…

Blogging more often… It’s hard to take the time to sit down and write a everything into a real article. Thinking that switching up my blogging style to have more short thoughts or ramblings will help me post and share more in the long run.