Skip to content

Twitter should render image of snippet when snippet url shared #237

Open
@chriswedgwood

Description

@chriswedgwood

@chriswedgwood — we should probably have a new ticket — derailing the Roadmap discussion — but 😀 — Ideally...

  • I'd share the django snippets (detail view) URL on twitter.
  • I could type my tweet.
  • If would display a nice render of the code.
  • But the key is that the link goes back to DS, where I can interact and copy the code.

For the image bit:

  • Not sure best way to generate it. Carbon is just what folks are using from this POV. Can we leverage it? Or do we do something with PIL? (It doesn't need to have every theme option and such of Carbon, if we do use PIL)
  • Not sure if we need to post the image to twitter, or can just use the OG tags. (I'd try the 2nd first, as it's clearly easier).

If I could use the same for blog posts and such — image, plus link back to editable snippet — that would cool. 🤔

I need to have a potter around Carbon to see what's possible there.

Originally posted by @carltongibson in #210 (comment)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions