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

Add OpenGraph meta tags (share preview data)? #863

Open
JoshuaKGoldberg opened this issue Jan 24, 2025 · 5 comments
Open

Add OpenGraph meta tags (share preview data)? #863

JoshuaKGoldberg opened this issue Jan 24, 2025 · 5 comments

Comments

@JoshuaKGoldberg
Copy link
Contributor

👋 Long-time user, first-time reporter here - love the site!

The confs.tech URL doesn't show very much when shared in social preview locations like Bluesky or Discord. You can see previews of common sites on https://www.opengraph.xyz/url/https%3A%2F%2Fconfs.tech%2F. Here's what I get sharing on Bluesky today:

Screenshot of sharing 'confs.tech' on Bluesky. The link preview only shows the confs.tech URL, no description, image, or title

Would you accept a PR adding some basic HTML meta tags for a nicer share preview?

@cgrail
Copy link
Member

cgrail commented Jan 24, 2025

That would be great

@JoshuaKGoldberg
Copy link
Contributor Author

🤔 so I looked into it and the tags should already be present:

<meta content='Confs.tech' property='og:title' />

...but they're not present on the deployed site, or even when served from the build folder locally after npm run build. So this is some shenanigan with how scripts/build.js creates the site.

@nimzco
Copy link
Member

nimzco commented Jan 25, 2025

Hey @JoshuaKGoldberg ! They are present, but on the rendered site. It appears after react loads.
Image

It is possible that opengraph only checks the HTML that the server renders and not what is rendered with JavaScript. In that case, you might have to update https://github.com/tech-conferences/confs.tech/blob/main/public/index.html instead 🤔

@JoshuaKGoldberg
Copy link
Contributor Author

Would it be possible to change the deployment strategy to pre-render the site? I could send a PR to add some basic meta tags in the meantime but that seems to me like a bandaid fix that adds duplicate code.

@nimzco
Copy link
Member

nimzco commented Jan 25, 2025

Would it be possible to change the deployment strategy to pre-render the site

Probably. It's currently deployed through Heroku as a static site. I'm not so sure what we need to update to get the site to be SSR. We probably would have to have a Node.js server doing it.
Given what the website does, if it's just for the meta tag, it's probably not worth the effort. And it might add additional hosting costs. 🤔

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

No branches or pull requests

3 participants