Skip to content
Add Search to Your Site

Add Search to Your Site

Smart Theme includes search functionality. To enable it, follow these steps:

  1. Go to your Ghost admin dashboard (https://yoursite.com/ghost)
  2. In the sidebar, go to Integrations
  3. Click `Add Custom Integration` and call it "search" (the name's not important). Save the integration
  4. Copy your Content API key
  5. Click the cogwheel ⚙️ to go to settings
  6. Go to Code Injection
  7. Add the following code to your Site Header (case sensitive)
<script>
    const SEARCH_API = 'THE CONTENT API KEY YOU COPIED EARLIER';</script>

8. Save the code and refresh your site. A search icon 🔎 will now appear!

Things to know

  • Post and page titles, tags, and text are included in the material to be searched.
  • The search is simple, which means that a search for "ghost" will only return materials that have the word "ghost" in them. In other words, the search is not fuzzy.
  • To improve performance and reduce network requests, materials are cached.
P.S. Search is active on this site. Click the search icon to try it out!