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

SEO issue with Facebook/Twitter #133

Open
theplatapi opened this issue Aug 16, 2016 · 5 comments
Open

SEO issue with Facebook/Twitter #133

theplatapi opened this issue Aug 16, 2016 · 5 comments

Comments

@theplatapi
Copy link

So SEO was discussed in issue #101 for the Google crawler, but this is concerned with the Facebook and Twitter crawlers. They both do not interpret JavaScript, which makes it impossible to dynamically set open graph tags for different pages. The link here shows what the demo RSB site looks like with the Facebook crawler.

Since Firebase currently lacks support for prerendering content, the pages need to be statically compiled. This means the initial HTML is downloaded and then React rebuilds the DOM for page transitions.

Without precompiling the HTML, every link to my site on Facebook uses the same image instead of ones customized for the content.

@koistya
Copy link
Member

koistya commented Aug 26, 2016

@theplatapi good catch! Do you need to pre-render full HTML or just meta tags?

@theplatapi
Copy link
Author

I actually made an implementation just rendering HTML files with the meta tags and it works. That saves the hassle of making the app isomorphic. I stored the metadata info into index.md files for each folder and then output HTML files for each folder in the /pages folder. The solution is a bit specific to my needs but the general idea should work for others.

@rossthedevigner
Copy link

rossthedevigner commented Nov 8, 2016

@theplatapi Would it be possible to share a gist as we am coming upon the same issue. Are you outputting all the HTML or just the meta? I am finding I need the former.

@theplatapi
Copy link
Author

@rossthedevigner I am outputting just the meta tags. I basically store my meta information in markdown YAML and make sure each page has a markdown file. Then in run.js I iterate through all of the routes in routes.js, import the markdown files, and output an html file per route.

Last I tried rendering all of the HTML I ran into problems, but with enough persistence it's possible.

@Shyam-Chen
Copy link

Prerender.IO?

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

4 participants