Looking through Discourse’s code, it looks like only standard Twitter Summary Cards are supported. I’d prefer to use Summary Cards with large images, which is a simple change to make, but I’m not sure how to hook into that code in application_helper.rb, or if that’s even possible. Any ideas for changing this meta tag to allow for including large images on Twitter Cards?
AI 生成的摘要
The discussion revolves around adding support for Twitter Cards with large images in Discourse. DanielMarquard initiated the conversation, expressing his desire to use Summary Cards with large images instead of the default Summary Cards. codinghorror mentioned that large images are already supported, but require a Twitter API key to work.
DanicelMarquard provided examples of both types of Twitter Cards, and pfaffman shared the same examples to see what the one-box displays look like. Falco suggested creating a SiteSetting to allow users to choose between different Twitter Card types.
techAPJ mentioned that adding support for large images was on his to-do list and would be completed by early next week. This was later confirmed by techAPJ, who announced that the feature was now implemented and directed the discussion to a related topic on meta.discourse.org.
A) this already works, just have to enter your twitter API key or it will not work
B) variable height stuff is not allowed in endless scrolling so whatever it is, we need to know its exact size to onebox it
Sorry, I meant for Twitter Cards in tweets.
Example with Summary Card (Discourse default): https://twitter.com/critcolaguild/status/775601821662474240
Example with Summary Card with Large Image: https://twitter.com/Recode/status/776274344578207744
I wanted to see what the one box displays look like
Example with Summary Card (Discourse default):
Example with Summary Card with Large Image:
I think we should create a SiteSetting twitter card type that let’s you choose between:
- Summary Card (current one)
- Summary Card with Large Image
- Photo Card
Those types can be supported just by adjusting the type, no extra markup.
Yes, this is on my to-do list. Relevant discussion here:
Will try to get it done by early next week.
I don’t think Onebox parses the link cards either way.
Fantastic. Thanks!
This is now done:
Let’s continue this discussion on above linked topic.