-
Notifications
You must be signed in to change notification settings - Fork 142
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
feat: social share meta/image #636
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
public/index.html
Outdated
<meta property="og:title" content="Quadratic" /> | ||
<meta property="og:description" content="Modern spreadsheet software." /> | ||
<meta property="og:url" content="https://%VERCEL_URL%" /> | ||
<meta property="og:image" content="https://%VERCEL_URL%%PUBLIC_URL%/images/social.png" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidkircos what are your thoughts on this?
These image URLs need to be fully qualified URLs, which means to truly test them we need to have the environment URL in there.
The way (I believe) this works is you can do %ENV_VAR%
and react-sripts
which does our front-end build will either replace that with the corresponding environment variable, or do nothing.
For our vercel builds, we should be able to do VERCEL_URL
but then when amplify runs, idk if there's a corresponding environment variable for that one? If there was, we could do both:
https://%VERCEL_URL%%AMPLIFY_URL%
cause both of those values should never be present, but that is kinda ugly and a bit confusing...
The simpler option is we could just stick this image in our quadratic-media repo and then just have one consistent URL across all our environments for the social images. That seemed like the easiest option, though it's out of this code base (and I don't have write access to that repo, so i'd need your help there)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, on prod we do this
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
I don't know if this works on Vercel but it does work on Amplify.
We only really need it to work in Prod, it's not complex behavior that we have to test.
No description provided.