Share cards for Marked Share

Public posts, profiles, and collections on now get their own share card. Paste a link into Mastodon, Slack, iMessage, or a blog comment and you should see the title, byline, and date on a Marked-colored card instead of the generic site image.

Private documents stay private. They keep the default image and never spend a generate.

What the card looks like

The card is 1200×630, paper-colored, with the Marked icon and a highlighter bar behind the title. Three lines of title, then an ellipsis. Author and date sit underneath.

Here’s what that looks like when a post lands on Mastodon:

Drop your screenshot in as /images/share-card-mastodon.png (or rewrite the path).

Cards generate in the background when you publish or when the title, byline, or date changes. Body-only edits do not. The page always points at a stable URL on Marked Share (/d/…/og.png, plus matching URLs for profiles and collections), so crawlers are not chasing a temporary image host.

Snapsly does the pixels

I generate the PNGs with Snapsly. One POST, a template, a PNG back. No browser farm of my own, no “please wait while we screenshot a page” in the publish path.

Snapsly is the easiest OG image API I have used. I send title, author, and date, and I get a 1200×630 card. That is the whole integration.

If you need share cards and do not want to babysit Playwright, start at snapsly.dev.

Sharing a highlight

The document card is for the whole post. A highlight is a different share: one passage, as an image you can drop into Mastodon, Bluesky, or a Slack thread.

Click a highlight and the action bar now has a share icon. That builds a 1080×1080 PNG of the passage — document title up top, the quote in a coral-to-purple gradient, attribution underneath. Download it, or copy the image and paste it into a post.

The PNG is drawn in the browser. Nothing goes to Snapsly, and comment-only pins do not get a card. Anyone who can see the highlight can make the image.

Other recent bits

While I was in there, a few other things landed:

  • Download and Print menus on the document preview, including print with highlights or a clean page.
  • Finish editing now includes visibility, so you can go public without a second trip through Share.
  • Welcome email after signup, and password reset by email, slug, or display name.
  • Micro.blog posts publish as timeline entries, not just a feed ping.
  • Keyboard help for Vimium/Vimari, plus some library header and upload-tooltip cleanup.

None of that is huge. All of it was in the way of actually using the site.

Product Hunt

Marked Share is on today. If you have an account and a spare upvote, I would love one.

Thanks for reading, and thanks for sharing your Markdown.

Like or share this post .


BrettTerpstra.com is supported by readers like you. Click here if you'd like to help out.

Find Brett on Mastodon, Bluesky, GitHub, and everywhere else.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论