Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance "open graph" meta property sharing #224

Open
2 tasks
garrett opened this issue Nov 22, 2018 · 5 comments
Open
2 tasks

enhance "open graph" meta property sharing #224

garrett opened this issue Nov 22, 2018 · 5 comments
Assignees

Comments

@garrett
Copy link
Member

garrett commented Nov 22, 2018

We already have a bit of this in the Cockpit project website, but it would be nice to enhance it further.

This is useful when people share links on Twitter, Facebook, and other sites. It's also a way to present the website a little more nicely in Firefox recents.

TODO

  • Jekyll implementation
  • Default image
@garrett
Copy link
Member Author

garrett commented Nov 22, 2018

@andreasn
Copy link
Contributor

Are there any specific size requirements?

@garrett
Copy link
Member Author

garrett commented Nov 22, 2018

According to CSS Tricks:

Facebook Twitter
The URL of the image for your object. It should be at least 600x315 pixels, but 1200x630 or larger is preferred (up to 5MB). Stay close to a 1.91:1 aspect ratio to avoid cropping. A URL to a unique image representing the content of the page. You should not use a generic image such as your website logo, author photo, or other image that spans multiple pages. Images for this Card should be at least 280px in width, and at least 150px in height. Image must be less than 1MB in size.

So, together, ideally:

  • 1200x630 (or larger)
  • 1.91:1 aspect ratio
  • < 1MB
  • Unique to the page, not the site (this is the tricky one for us). I suggest the following:
    1. Use an image specified in frontmatter (yaml block at the top)
    2. Otherwise, if the page includes an image, use the first image
    3. Otherwise, fall back to a default Cockpit image

@garrett
Copy link
Member Author

garrett commented Nov 22, 2018

The default Cockpit image could be based on the website's front page. Or we could do something snazzy with the logo. Or just use the logo in those dimensions on a white background in the correct aspect ratio with a little bit of padding.

I'm happy to take on the Jekyll part and can do the third option here for the default image. If you have an idea for something snazzy, I'll happily add that in instead too.

@garrett garrett self-assigned this Nov 22, 2018
@garrett garrett changed the title enhance "open graph" meta propery sharing enhance "open graph" meta property sharing Nov 22, 2018
@garrett
Copy link
Member Author

garrett commented May 25, 2021

https://flathub.org/apps/details/com.rafaelmardojai.SharePreview looks really useful for this, but it crashes on Cockpit-project.org at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants