jekyll / jekyll-seo-tag

A Jekyll plugin to add metadata tags for search engines and social networks to better index and display your site's content.
https://jekyll.github.io/jekyll-seo-tag
MIT License
1.66k stars 294 forks source link

Should be able to add image to Twitter card without it being a large image #84

Closed GarthDB closed 7 years ago

GarthDB commented 8 years ago

The standard summary card has a twitter:image property as well.

It's nice to use it for the site logo on cards that don't have large images.

DirtyF commented 8 years ago

@GarthDB @pathawks Should we support two different custom front matter variables page.large_image and page.image in order to allow this?

https://github.com/jekyll/jekyll-seo-tag/blob/master/lib/template.html#L153

GarthDB commented 8 years ago

I was thinking an image in the site config would be a nice default for standard summary cards, but a per post property might be good as well.

mderriey commented 8 years ago

I've just started using jekyll-seo-tag and it's great, thank you so much for that!

The best option for me would be to be able to choose on a per-post basis whether to use a standard summary card or a summary_large_image card.

If that's too hard, then @GarthDB's suggestion looks good, too. I understand it this way:

I'll be happy to submit a PR for that, though I will need a bit of guidance as I've never used Ruby before.

Cheers!

daviddarnes commented 8 years ago

I've noticed this issue has been open for a while. For anyone looking for a workable, yet awful, workaround you can do the following:

{% capture seo %}
    {% seo %}
{% endcapture %}

{{ seo | replace: "summary_large_image", "summary" }}
benbalter commented 8 years ago

Could the folks on the thread advocating for the feature describe their use case a bit more? When would you provide an image and not want it large? Is it just a matter of personal preference? Is it because you're setting a default image on all pages? What's the downside to the image being large in all cases, etc.?

mderriey commented 8 years ago

For me, I'd like a large image when I have a specific image for a specific post. If I don't have one, I feel like a small image with the site logo is enough.

daviddarnes commented 8 years ago

In my case I'm using it for my personal site, and the Twitter card image is my profile picture. So I encounter 2 main problems:

The 'regular' summary image card for Twitter is better designed for square images without much detail, so having the option certain pages would be great.

GarthDB commented 8 years ago

Some screenshots might help this discussion:

Here's the standard image: image

Here's the large image: image

Twitter's description of the large image card is: The Summary Card with Large Image features a large, full-width prominent image alongside a tweet. It is designed to give the reader a rich photo experience, and clicking on the image brings the user to your website.

I agree with @mderriey and @daviddarnes on use cases @benbalter.

schoenwaldnils commented 7 years ago

Any updates on this? I had to use @daviddarnes workaround.

jekyllbot commented 7 years ago

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

BlythMeister commented 7 years ago

Not sure how to request this to be re-opened but this is still an issue as your forced to have a large Twitter card as soon as you put an image.

I've put a PR in with a proposed "fix" whereby at a site level you can specify you don't want large cards. This may be better at a post level, but since the workaround was at site level, this seemed reasonable.