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

Possible to have dynamic social media cards? #60

Open
maysaleba opened this issue Apr 6, 2022 · 1 comment
Open

Possible to have dynamic social media cards? #60

maysaleba opened this issue Apr 6, 2022 · 1 comment

Comments

@maysaleba
Copy link

Hello, is it possible to have a dynamic social media cards when this solution is used?

I've tried using react-helmet to have custom og properties on my app but doesn't seem to work as it will only see the 404.html properties. Is there a workaround to this?

@PixelatedLagg
Copy link

Necro-post, but it has to do with how Github Pages serves 404.html. Since (to Github's servers) the client is requesting a non-existent page, Github's servers respond with a 404 response along with 404.html. This isn't a problem with browsers, but crawlers that social media sites use to search for OpenGraph tags give up when they reach the 404.

A solution I've seen posited is to use a meta refresh on 404.html to pray for it to substitute for a 301 or 302 status code. This didn't work for me (still haven't found a solution :<), but it might for any lurkers of this post.

Article that goes more in depth:
http://www.backalleycoder.com/2016/05/13/sghpa-the-single-page-app-hack-for-github-pages/

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

2 participants