Adding Search to Ghost

Post cover image
  1. Head over to the Google Custom Search tool and login with your Google credentials

  2. Fill in your domain name and click "Create"

  3. Click "Get Code"

  4. Copy the provided code. It will look something like this:

    code provided
    This code can be placed anywhere in Ghost, including a post, page, and in your theme. As an example I have added my snippet of code into the Casper theme:

    I added my snippet into the index.hbs file of the Casper theme.

  5. Once you have your snippet of code in place you can start to customize how it looks. In the Google Custom Search Control Panel click on "Look and feel"

  6. In the "Look and feel" section you will have three main configuration sections:

    • Layout - Control the layout of your search engine results
    • Themes - Set the color scheme of the search engine results
    • Customize - Configure the search text box, search button, etc
  7. Once you have your configurations all dialed in you can go back to Ghost and refresh and your settings will be viewable.