Should the Micro.blog apps use the markdown syntax for images?

Currently, adding a photo to micro.blog inserts <img> HTML tags versus ![](). Using Markdown syntax would allow us to use Hugo’s render hooks. This would mean a plugin like glightbox could add a render hook template for images and avoid the use of a shortcode (or at least exclusive use).

This would mean I could use glightbox without breaking the newsletter feature (which grabs content somewhere in the rendering pipe before shortcodes are expanded) and just makes it easier to get these features for end users simply as a consequence of using micro.blog and having the plug in installed without having to remember the syntax.

This was inspired by @pimoore and @amit discussing some of the limitations of shortcodes during Micro.camp. I personally would love to move my usage to Markdown, because there are places shortcodes don’t work today (newsletters). In fact, with 0.91 I think I can add this capability to the plug in, it’ll just be less obvious/convenient when using the apps (or MarsEdit) since the default is not to use Markdown image syntax.

I haven’t gotten around to enabling newsletters yet, but if I’m understanding you correctly shortcodes don’t work at all in newsletters? That’s a huge problem for Tufte if true.

That’s right. For newsletters, posts are not processed through Hugo, but instead converted from Markdown to HTML by Micro.blog and added directly to the email. It doesn’t matter what a theme does around posts, just the post text itself.

Render hooks look interesting. The main reason we use img tags instead of Markdown is because I found that providing a width/height can be helpful in some situations where there is no CSS to control the image size.

Yeah-- I think the problem is that HTML support in email is so poor/degenerate that processing through Hugo likely makes it very messy for valid email.

You’d think with how long email has been around the spec would’ve been improved in this regard by now.

Email feels very old school. Only recently I moved away from using tables :sob: Of course that’s only possible if it’s a simple email.

A lot of email programs all behave differently and there seems to be no true standard (except tables and inline styles). That used to drive me mad at my very old job… so much so that I refused the work :sweat_smile:

Slightly off topic, but using mjml at work has made email way less painful for us.

I’m highly interested in this topic, as the issues with newsletter formatting have driven me to using other platforms instead of Micro.blog. Given that Micro.blog handles just about anything you throw at it, from micro posts, to photos to longer essays, I would love to consolidate my online content generation on here.

I recognize how difficult it is to make rich formatting look good across different email clients. It’s so much harder than on the web. It looks like some changes were made to better support Gmail, though, which was previously in a poor state.

Maybe this mjml product could help with standardization?

I’ve been doing more testing with Gmail, and I have a fix for the image width problem with Gmail ignoring CSS. I’ll be rolling it out in the coming days. If anyone is aware of other issues with email clients, definitely send me an email.

1 Like

OH !! Maybe this is why my blockquote on the site arent coming through to the newsletter - although the cite is … hmm