This article will help you implement a custom Google search to your browser output. Google search provides an alternative to the built in search in Browser Help output that is more comprehensive and customizable.
You should carefully evaluate whether Google search is a good fit for your requirements, including any charges that might be made by Google for use of the service (at time of writing Google Custom Search was free for low volume searches).
In order to include a custom Google Search in your Browser output, you need to follow these instructions:
- Create a custom search on https://cse.google.co.uk/cse/ by clicking New Search Engine, selecting the domain to search as well as the Language and Name of the Search engine.
- Once you have created your custom search select Look and Feel on the left-hand menu located under Edit Search Engine and then choose Full-width:
- Press the Save and get code button at the bottom - you will need this in step 5.
- Create or open a custom template that is based on the Classic (Browser Help). You can find out how to create a custom template here:
- On Page Types, edit websearch.html by clicking the edit button on the toolbar. From there, you need to remove all of the content inside the <body> tag and paste your custom Google search code (given after you have done step 3 when you select "Save and Get Code"). Be sure to place it inside of a div element as Google instructs.
- Change the Google search code from:
- Close your custom template and save when prompted - and remember to select your custom template to be used in the Build Profile Editor under Templates.
- Be sure to have your site indexed via the Google Search Console: https://www.google.com/webmasters/tools/ - you need to do this by submitting a site-map to the Google Search Console. You have to specify the subdirectory or subdomain that you wish to be searchable in the setup of the Google Custom Search, and we would advise you to make sure Google has indexed your entire domain on the search console.
After implementing these steps, your search should look like this: