Open saschwarz opened 5 years ago
It seems like this works quite well with the transformer, do you have a suggested way to solve this differently? I don't think the query will resolve the query with full URL via graphql without additional processing, which is more flexible with transformers.
What's your idea to fix this?
I'm sorry I wasn't clear. Using transformers is a flexible approach.
As someone new to this plugin/Algolia this was a problem I encountered. So I thought it would be helpful to other new users to add a note (and example?) in the documentation to either use Gatsby's Link
component when rendering results or to manually prepend it in the transformer.
Currently, the user has to append the Gatsby
pathPrefix
https://www.gatsbyjs.org/docs/path-prefix/ manually in their transformer in order for Algolia to have the correct URL (assuming the slug is rendered directly in the search results).It would be helpful if there were at least a discussion of the best practices for search when the site is hosted at a
pathPrefix
.This is what I ended up doing: