-
-
Notifications
You must be signed in to change notification settings - Fork 854
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
Fix embeds not working as intended #92
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/atapas/react-play/4BP3cnRy8PHuAM7Cu96S4HxCzBrR |
This should now fix Twitter etc. not being able to access our meta tags! |
Thats odd, the build ran perfectly on localhost and it gives me a 404 when I try to view the details :( |
The build log says this: https://cra.link/deployment21:12:55.995 | |
Oh, thank you! I'll look into the issue ASAP! |
Seems like an issue with puppeteer, this should hopefully fix it! |
That's really odd, the new config should allow puppeteer to run without any issues |
Log[21:23:47] Cloning github.com/atapas/react-play (Branch: main, Commit: 332fa55) |
The why-react play seems throwing error. Just fyi |
So, everything runs normally and react-snap crawls each page without any issues, but for some reason it crashes at the last second? This is really weird, I'll try to fix it ASAP, sorry this took so long ! |
No worries, I see it gives id thanks for one if the play. I see it in the log. That may give some lead. Btw, take it easy. No hurry 😀 |
Seems like it was caused by WhyReact using react-router-dom functions for it's id. This should now hopefully fix it! |
LET'S GOOOOO finally got it !!!!!😄😄 |
First thing I will review it tomorrow morning and merge. Good work. |
Alrighty! Thank you so much, I'm glad I can be a part of this amazing project !!! |
Description
This PR adds the meta tags back into the index.html file, and adds the react-snap package. I noticed that the new way of handling meta tags doesn't work for some sites, as they do not run JavaScript to fetch the metadata, meaning that react-helmet doesn't get a chance to update the meta tags.
This PR adds react-snap to fix this issue. Now, every time we run npm build, react-snap will go through all of the available routes and generate a static HTML page for them. Meaning that any site and app will have a static HTML file available for them, accessible even without JavaScript.
Fixes #90
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
I disabled JavaScript on various browsers and visited all available pages on the site. I can confirm that the meta tags show up without any issues. This should now hopefully fix the embeds on social media sites.
Checklist:
Notes:
This new fix should add the embed functionality, but if anything doesn't work as intended, I'll push a bugfix ASAP! These meta tags turned out to be a much more complex issue than I initally thought ! 😄 😄