politeiagui icon indicating copy to clipboard operation
politeiagui copied to clipboard

[plugin-architecture] Investigate ways to improve SEO

Open victorgcramos opened this issue 2 years ago • 1 comments

Our current politeia app-shell from the new plugin architecture has no SEO tags. Ideally we should provide a better way to display link previews for proposals details, and maybe find a way to render at least the proposal title.

Also, we should:

  • apply the current SEO tags from https://proposals.decred.org (you'll find them here: https://github.com/decred/politeiagui/blob/master/public/index.html)
  • handle document title correctly
  • render favicon properly

victorgcramos avatar Jun 15 '22 13:06 victorgcramos

In order to provide dynamic document titles and meta tags, we should provide an index.html with those tags on the first render. It's not possible to generate those metatags after executing the regular fetching like we currently do because our application runs client-side rendering. (See twitter cards example)

This is why most people recommend server-side rendering for a better SEO.

We can create a new app that renders html previews using SSR, and proxy the /share route to it. This way we can share links like https://proposals.decred.org/share/record/:token with the correct SEO preview. When user navigates to the share URL, it will be redirected to proposals app.

That's the easiest way I could think of without adding too much code.

victorgcramos avatar Jun 29 '22 20:06 victorgcramos