This is an experiment how to improve the apearance of GitHub repoository on social media, like Twitter, Facebook and LinkedIn.
Comparison before and after improvement
|media||repository itself||GitHub Page|
Problems at sharing a GitHub repository on social media
Even if you want to display the application’s logo when social media sharing, your account profile image (often is a face picture) is used as og:image. Your face is also stretched in LinkedIn. This is not good looking.
A message is appended on twitter: “Contribute to <repository-name> development by creating an account on GitHub”. I think this message is nice, but may not suitable on situation such that portrait list.
How to improve the appearance of social media
The solution is to create an application website using the appropriate ogp tag and use it for sharing on social media. This is easy with the GitHub Pages.
- create some markdown file for website, or reuse README.md
- create a logo image (height: 630 / width: 1200 seems to be the best)
- create _config.yml for jekyll configuration
- publish these with GitHub Pages
- finally, use the url of GitHub Page for sharing on social media.
The contents of _config.yml are like this.
theme: jekyll-theme-cayman twitter: username: set0gut1 defaults: - scope: path: "" values: image: path: /img/logo.jpg height: 630 width: 1200
Link to related information
- Checking tools for the appearance on social media
- Other options of _config.yml for meta tag
- Issue on github: Support custom (per repository) og:image thumbnails.