See T13018 for previous discussion. I'm separating this out since "Twitter OpenGraph" and "Discourse OpenGraph/OneBox" are related but not really the same, and I think the "Phame + Twitter" use case is generally more compelling than the "Maniphest + Discourse" use case.
The Twitter card guidance is here:
The properties we can specify are:
- twitter:card as "summary", "summary_large_image", "app", or "player". Unclear what the difference is, but probably "summary" or "summary_large_image" are what we want. It's possible this should be configurable but we can likely guess.
- twitter:site is a Twitter @handle for the originating website, like @AcmeBlog. We could let users specify this on posts and/or provide a default on blogs.
- twitter:creator is a Twitter @handle for the author. We could let users specify this on posts, and/or provide a default on blogs. If users have a connected Twitter account for auth we could use that too, but I don't like making authentication details like this public by default. I'm somewhat inclined to just skip this for now.
- og:url should be the canonical URI.
- og:title should probably be the post title. Allowing users to customize this feels like it's probably overboard on settings.
- og:summary we can default to summarizing the content, but I think it's reasonable to also offer a "Summary" on posts that can override this. We can use this on the main Phame article list, too, if authors want to choose a summary which is different from the first few sentences of the post.
- og:image we can use the post header image and fall back to the blog header image for now.
So the storage changes to blogs are:
- Method to specify the default content @handle.
- Method to specify the default author @handle.
The storage changes to posts are:
- Method to override the post summary. This can be reused on the blog list.
- Method to specify the content @handle.
- Method to specify the author @handle.
The stuff in italics is probably not worth implementing for now.
I'd like to hide the OG detail stuff away from the main edit flow, but this is straightfoward.
(I'd also like to at least partially realign this on the new "document" layout that comes out of T13410, e.g. the "Actions" moving out of "Actions" and into a right-hand sidebar in editable views. Blog posts probably shouldn't have persistent navigation, but we could think about this or make it an option.)