-
Hello, I come across the sample from https://www.algolia.com/doc/guides/building-search-ui/going-further/server-side-rendering/js/
I do see we need to make the search page to be SEO friendly and crawlable like by Bing or Yandex (other than google that support JS rendering). The problem I see here, It refer to a tools rendertron and don't point to anything else, which is problematic in my humble opinion. Is there anyway to use the instantsearch.js and keep using SSR so the Crawler or others can can see the page, hydrated, and go with the page with minimum effort? Or my assumption seems to be impossible to be implemented? Any feedback really appriciated! InstantSearch.js Library and Dynamic rendering or Server Side Rendering |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
We don't have more detailed instructions as technically this isn't a straightforward solution. In a node environment you can do server-side rendering using InstantSearch.js if you create the same widgets as you would on the frontend, then call An approach showing similar problem-solving can be seen in https://github.com/algolia/instantsearch/pull/5579/files Unfortunately the situation at the end of the day is that most consumers that use InstantSearch.js also have little control over their backend, and even if we'd have a tool to pre-generate the html, they couldn't use it (think of shopify for example). They usually therefore either use eg rendertron, or assume (in most cases correctly) that client-rendered pages also get handled by crawlers. What is your exact backend environment, and what are your exact goals? Do you have InstantSearch on multiple pages, how much control do you have over the stack? |
Beta Was this translation helpful? Give feedback.
I don't think that's silly, but you'll have to recreate the whole dom InstantSearch creates in php. What you can do is the simpler version of the dom so that SEO can be happy in the server. We don't have a guide for that as it involves recreating quite a lot of the InstantSearch js code in php, but it's definitely possible and avoids spinning up the servers