Repository navigation
Give project pages their own share card - #60
Merged
Merged
Conversation
Project pages shared the home card. They now point og:image at a static light card about type coverage history, so a project link is distinguishable from a home page link. The project numbers stay in og:title and og:description.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Every page shares one Open Graph image, so a link to a project page (e.g.
shepherd.dev/github/vimeo/psalm) previews the same dark "Watch your PHP get stricter" card as the home page. The project's numbers already appear inog:titleandog:description, but the image doesn't tell the two kinds of link apart.Solution
Project pages get their own static card,
assets/img/og-project.png. Its light layout reads "Type coverage history", with an illustrative coverage and expressions chart, so it is clearly different from the dark home card. The "no reports yet" page uses it too.head.phptakes a$share_cardargument ('home'by default, or'project') that picks the image and itsog:image:alt. Both images keep the?v=<mtime>versioning. There is no image rendering on the server: free hosted generators can't use our logo or are no longer maintained, and per-project numbers are already in the card text.