Fix google search snippet, add search-on-enter feature
- For #167 (closed)
- Refactor the implementation of the Schema.org SearchAction data (change from JSON to microdata)
- Add Google verification meta tag
What I did
- Wrapped the
input
in a<form>
with the correct search action and made it work- The autocomplete function was preserved
- On pressing enter, it takes the user to the search results page with the query parsed to the URL and preloaded with the page
- This way I made sure parsing the search query through the URL was working
- Implemented the SearchAction microdata directly to the form, so that there's more chance it will work properly and Google will hopefully display the search snippet for us
How the search works now
- Type to search as you normally do
- If you found what you want, select one of the results and we're done
- If you didn't, press enter
- It will take you to the search page loading all the results for your query
Review apps:
- Search from the homepage: http://fix-search-snippet.178.62.207.141.xip.io/
- Search from any other page: http://fix-search-snippet.178.62.207.141.xip.io/ee/
cc/ @axil
Edited by Marcia Ramos