Skip to content

Give project pages their own share card - #60

Merged
alies-dev merged 1 commit into
masterfrom
alies-dev/og-project-card
Nov 21, 2026
Merged

alies-dev merged 1 commit into
masterfrom
alies-dev/og-project-card

Conversation

@alies-dev

Copy link
Copy Markdown
Contributor

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 in og:title and og: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.php takes a $share_card argument ('home' by default, or 'project') that picks the image and its og: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.

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.
@alies-dev alies-dev self-assigned this Nov 21, 2026
@alies-dev
alies-dev merged commit a4f0da7 into master Nov 21, 2026
3 checks passed
@alies-dev
alies-dev deleted the alies-dev/og-project-card branch November 21, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant