MJML for responsive digest and notification emails and other questions

I’ve been diving into discourse code base recently a lot and I’ve seen that digest.html.erb is heavily hardcoded with not many options to extend.

I personally would like to explore the option to contribute to discourse by trying to add MJML framework.

Can someone give some tips where is best place to start this experiment in the codebase?. I don’t have any experience with ruby, this would be good opportunity to learn.

Additional question, would discourse developers accept slight modifications on digest.html.erb? Like adding some addition div wrappers to make styling easier and some css classes on elements that don’t have them. Or maybe approach to digest.html.erb in way the _post.html.erb email is handled (I see that is lib/email/styles.rb handles changing the classes with inline css).


Here is a plugin that overrides the summary email. GitHub - pfaffman/discourse-add-to-summary: Add text to summary before and after title. It should be fairly straightforward to modify it for whatever you want.

It’s a bad idea to override a template since it’ll break if the template gets changed on a way that’s incompatible with your changes. It’s happened to me at least once since I wrote this.