Skip to content

How to enable search

Eduardo Gómez edited this page Aug 19, 2022 · 4 revisions

Ghost native search

From Ghost 5.30.0 it's now possible to use the brand new native search functionality, you can learn more about it here: https://ghost.org/changelog/search/

This feature is not enabled by default, if you prefer the native search over the custom search provided by the theme you have to enable it in the theme settings under the Site-wide section:

CleanShot 2022-08-19 at 23 21 41

Please note that unlike the theme custom search, you don't need to generate an API key in order to make it work, you can leave that field as it is.

Theme custom search

To enable the theme custom search you have to do the following:

In the Ghost Admin go to Integrations and click on the Add custom integration button. You can name it as you like but I recommend you name it Search.

Then 2 keys will be generated but you only need to copy the Content API Key.

Ghost 4.20.x

From Ghost 4.20.0 it's now possible to save the Content API Key in the Site-wide site settings under the field Search API key as shown in the next screenshot:

Finally save your changes.

Previous versions

Head to the Code injection menu and paste the following code into the box corresponding to the Site Header:

<script>
  const ghostSearchApiKey = 'YOUR_CONTENT_API_KEY_GOES_HERE'
</script>

Remember that you have to replace YOUR_CONTENT_API_KEY_GOES_HERE with the Content API Key that you got in step 2.

Finally click on the Save button and refresh your blog page to see the search button.