oxfordunichess / oucc-frontend

React rewrite of OUCC website to make it super easy to edit info and cleaner views
https://oxfordunichess.github.io/oucc-frontend
MIT License
2 stars 1 forks source link

Can't get social media preview links to do anything nice #10

Open theLAZYmd opened 4 years ago

theLAZYmd commented 4 years ago

ex: https://oxfordunichess.github.io/oucc-frontend/curr_news#wednesday-clubnights image

theLAZYmd commented 4 years ago

So the source of this is that the site is build as a single-page react-app which redirects from a 404. Normally bots such as google and facebook follow JavaScript redirects but the problem is that we dynamically route, which means we have to make requests to the back-end to know what the page is. This means it just uses the 404 page for meta content. I've actually seen really professional outfits such as Jotform and the FT have trouble with this kind of thing so I wouldn't stress that we're being incompetent here.

theLAZYmd commented 4 years ago

Seems like there could be a solution using this tool Prerender but it's unlikely it can be implemented on github pages and we'd need access to Apache config on Oxford user sites to do it there https://github.com/prerender/prerender-apache

theLAZYmd commented 4 years ago

https://github.com/oxfordunichess/oucc-frontend/commit/6a651c54b8596732f2b05fd7f48d6bc965602418 is the first step to fixing this