Skip to content

Adds search results page to the docs

Marcia Ramos requested to merge docs-test-add-instantsearch-1 into master

Review Apps: http://docs-test-add-instantsearch-1.178.62.207.141.xip.io/search/

Pre-implementation:

  • Add search page
  • Add InstantSearch library
  • Figure out how to use the same index as DocSearch
  • Fetch and display the results
  • Style the CSS

The URL parameter is already working. We'll need it for !190 (merged):

url_param_working

FE implementation

  • Dismember the <head> file to include the instant search stuff only in the instantsearch layout
  • Remove the search bar from the nav on the dedicated search page
  • Display the results only when the user starts typing (currently if you visit /search/, you'll see results before any search starts => needs this code snippet
  • Check, review, clean up the code of this MR, and fix anything if necessary
  • Make SCSS implementation (CSS is currently hardcoded in a <style> tag) (can we use a theme or template and pick it from there?)

There's another problem: we need to try to display some content with the header in the results where the hit is in the header, e.g., http://docs-test-add-instantsearch-1.178.62.207.141.xip.io/search/?q=gitlab%20pages&idx=gitlab&p=0.

References:

Complementary references:

Edited by Marcia Ramos

Merge request reports