Skip to main content
The Algolia integration is deprecated. Sites that use it can keep using it, but Typesense is the recommended search engine. It is hosted and managed by Outpost, so there is no separate account to run.
Outpost’s Algolia integration indexes your Ghost posts in your own Algolia account and adds a search popup to your site, so readers can search your posts with typo-tolerant full-text search.

Setup

1

Create the index in Algolia

In Algolia, create an application and an index for your posts. Outpost connects to an index that already exists, so create it before you connect.
2

Add the integration in Outpost

Go to Integrations and Core Connections → Integrations, click Add Integration, and choose Algolia (Deprecated).
3

Enter your Algolia details

Enter your Application ID. The remaining fields appear once it is filled in. Search API Key, Write API Key, and Index Name are all required. The search key is the one readers’ browsers use to run searches, and the write key is the one Outpost uses to update the index.
4

Choose the search options

  • HTML selector that opens the search popup: Use Default Ghost Search button opens the popup from the search button already in your Ghost theme. Custom HTML selector opens it from the elements matching a CSS selector you enter, such as #search-btn.
  • Hide Tags from Search Popup: tags to leave out of the popup’s tag filter.
  • Add paid posts to Algolia index: off by default. See What gets indexed.
5

Connect

Click Save and Connect. Outpost adds your published posts to the index in the background.

What gets indexed

For each published post, Outpost adds the title, the excerpt, the slug, the URL, the feature image, the authors, the tags, and the first 5,000 characters of the body text. Internal tags (those starting with #) are not added. What stays out of the index:
  • Paid (members-only) posts, unless you tick Add paid posts to Algolia index.
  • Email-only posts, drafts, and scheduled posts.
  • Posts tagged #hide or #newsletter.
When you change a post so that it falls into one of these groups, for example by unpublishing it or adding #hide, Outpost removes it from the index.
If you tick Add paid posts to Algolia index, follow the instructions shown under the box. In Algolia’s index configuration, make the html field unretrievable so the body text of paid posts can’t be read through search, and set its snippet length to around 40 words.
When you connect, Outpost sets the index’s searchable attributes, ranking, and tag filtering for you. It sets them again, and re-adds your posts, each time you save the integration, so changes to those settings made in the Algolia dashboard are replaced.

When indexing happens

Outpost automatically updates your Algolia index when:
  • A post is published: adds it to the index
  • A post is updated: updates the existing entry
  • A post is unpublished or deleted: removes it from the index

Search on your Ghost site

Outpost adds its own search popup to your site, with a search box, results, a tag filter, and pagination. Each result shows the feature image, the title, the first author and tag, and the excerpt with the matching words highlighted. No theme edits are needed. The popup opens from the trigger you chose in HTML selector that opens the search popup. Outpost takes over those search buttons, so a click opens the Algolia popup and Ghost’s own search doesn’t open as well. Visitors can also press Cmd+K on a Mac, or Ctrl+K on Windows and Linux, to open it on a page that has a search trigger. The trigger works the same way as it does for Typesense, which Choosing how search opens describes in more detail.