Friendly URLs + Routing with SearchKick

I am currently in the midst of building a directory that list services in a particular City and State. My goal is to be able to have a user search from the homepage and navigate to a static URL that is SEO friendly. This URL should also update and cache whenever a new listing is added. Is this something that's SearchKick is capable of? Thank you!

Posted almost 6 years ago by johnathan
Posted almost 6 years ago by Alex Yang

Johnathan, can you explain more on what you're looking for? The search feature as demonstrated in the Yelpdemo course contains the search terms in the URL (e.g. ''). You could make this more readable (e.g. ''), but it should already be fine from an SEO standpoint.

The searchkick gem handles the output of search results but not the URL for the page that they're displayed on. You'll need to set that up separately in your config/routes.rb file.

Finally, I'm not that knowledgeable when it comes to caching, but I recommend reading the Rails Guide on this topic:

Hope that helps!