Skip to content

Event link preview and meta tags (#593)#665

Open
SinhSinhAn wants to merge 4 commits intodevelopfrom
feature/593-event-link-preview
Open

Event link preview and meta tags (#593)#665
SinhSinhAn wants to merge 4 commits intodevelopfrom
feature/593-event-link-preview

Conversation

@SinhSinhAn
Copy link
Copy Markdown
Contributor

What's going on here

So right now, if you share a club page link on Discord or iMessage or whatever, you get a nice rich preview with the club name, logo, tags, and member count. But if you share an event link, you just get a boring plain link with no preview image at all. This PR fixes that.

The OG image (opengraph-image.tsx)

I basically followed the same pattern as the club OG image that was already built for #519. The new one lives at src/app/events/[id]/opengraph-image.tsx and generates a 1200x630 image that shows:

  • The event name as the big headline
  • The date and time (formatted nicely, handles same-day and multi-day events)
  • The location if there is one
  • The hosting club name with its profile image (little circular avatar)
  • The UTD Clubs branding at the bottom

If the event has a banner image, it shows up on the left side of the card (same layout logic as the club OG image with the profile picture). If there's no image, everything centers up.

One thing worth noting: I added a status = 'approved' filter on the database query so that pending/rejected/deleted events don't get a real OG image generated for them. The club OG image doesn't do this (it just checks by slug), but for events it felt important since event IDs are less guessable than slugs.

The metadata (page.tsx)

The existing generateMetadata was pretty barebones. It had the title and a description, but was missing:

  • Twitter card (summary_large_image) so the OG image actually shows up on Twitter/X
  • Event time in the description, so when you see the preview you know when it is
  • Location in the description
  • OpenGraph title (was only set on the top-level metadata, not in the openGraph object)

Now the meta description reads something like: "Wed, Apr 2, 7:00 PM - Wed, Apr 2, 9:00 PM | ECSS 2.102. ACM Meeting from ACM at UTD on UTD Clubs". You get the time, location, and the club name all in one glance.

Closes #593

Create opengraph-image.tsx for event pages following the club OG pattern.
Enhance generateMetadata with event time, location, and twitter card.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clubs Ready Ready Preview, Comment Apr 3, 2026 5:20am

Request Review

Copy link
Copy Markdown
Member

@TyHil TyHil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks so good! Couple small things

If you wanna add the approved check to the club open graph image too, that'd be great

- Use date-fns format matching EventTitle.tsx (start + duration style)
- Parallelize async calls with Promise.all in OG image
- Remove opacity on location text
- Match UTD Clubs logo to 40x40 (consistent with club preview)
- Add approved filter to club OG image query
@SinhSinhAn
Copy link
Copy Markdown
Contributor Author

SinhSinhAn commented Apr 3, 2026

Also added the approved filter to the club OG image query (directory/[slug]/opengraph-image.tsx) as you suggested. All the feedback are now apart of the latest push, lmk if you need anything else

Copy link
Copy Markdown
Member

@TyHil TyHil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Looks great now!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event Link Preview & Meta tags

2 participants