unjournal / unjournal_gitbook

https://unjournal.org
Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

Mailchimp template #4

Open daaronr opened 1 year ago

daaronr commented 1 year ago

@fernandosmither I adapted your template HERE

But I want to see what it looks like in context. When and how does the Gitbook Diff content get piped in?

Also, I removed my home address. I assume that's not a legal requirement?

fernandosmither commented 1 year ago

image image

I added you back on the test tag.

Whenever you push a commit containing #PushNewsletter in the commit message, everything that was added on already existing files will show up on the email. The pipeline assumes it's in markdown format, and so, parses it to html before sending it.

daaronr commented 1 year ago

This format looks pretty good, except for the centered text. Left-justified would be better.

I'm also curious how it handles some of the 'fancier' features allowed in Gitbook, such as:

daaronr commented 1 year ago

everything that was added on already existing files will show up on the email.

If I understand, this means that if I want to the updates on new pages (subpages etc) I need to first create that page and commit/push, and then add the content to that page and commit/push with the special hashtag.

fernandosmither commented 1 year ago

Also, I removed my home address. I assume that's not a legal requirement?

It is!

I'm not 100% sure if this applies in this case (opt-in newsletter of a non-profit) as I'm not an American, but it would seem to me like that's the case, as stated in the CAN-SPAM act. Better explained here though.

This format looks pretty good, except for the centered text. Left-justified would be better.

I encourage you to play around with the MailChimp template creator and make one readers will love! The one I did was really a quick draft just to test and ship the code faster.

fernandosmither commented 1 year ago

I'm also curious how it handles some of the 'fancier' features allowed in Gitbook

Are the ones you provided all the ones you'll use? I'm yet to find a library or util that will do that for us. In the mean time, to feature embedded urls I created a "pre-parser" in bae8e90, which is just a regex replacer. Not the best solution, but we could parse them this way until I find a better way. So let me know the ones you use the most.

If I understand, this means that if I want to the updates on new pages (subpages etc) I need to first create that page and commit/push, and then add the content to that page and commit/push with the special hashtag.

Exactly. Did this to prevent unwanted behavior, as the original requirement was just to send via email the updates on SUMMARY.md. This way, if you include a new page on accident, it won't show on the feed.