-
-
Notifications
You must be signed in to change notification settings - Fork 603
How to enable 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:
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.
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.
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.
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.