Set up search

Set up search

Simply Static included two different search solutions. A file-based local search index based on Fuse.js and API integration with Algolia.

Once activated, Simply Static will automatically generate the search index on each full static export.

Configuration

You should start by configuring the search in Simply Static -> Settings -> Search. First, you need to decide whether or not you want to use the search integration and which solution you want to use: Fuse.js or Algolia.

Set up search 1

Indexing

You can configure what Simply Static should index and display in search results. It provides some defaults, but you can use pretty much any HTML tag you like.

You can also exclude specific URLs or just patterns from indexing to optimize the search experience for your visitors.

Set up search 2

CSS-Selector

You can add a CSS selector for your existing search input field, and Simply Static Pro will automatically convert it to a static search input.

Set up search 3

Where do I find the CSS-Selector?

You can get the CSS-Selector of your search input field directly from your website. Open your browser console and inspect your current search box. Here is an example of the TwentyTwenty WordPress theme:

Set up search 4

Algolia

To use Algolia for the search integration you need an account at Algolia. The service is free to use as long as you don’t have more than 10.000 searches per month.

Set up search 5

Create Index

Once you have created an account at Algolia, go to search and click on “Create Index”. A little box will appear that you can fill out with the necessary information:

Set up search 6

API Keys

Next, we have to get the API keys. Click on your profile picture in the top-right -> Settings and then click on “Manage Applications”:

Set up search 7

Click on “New Application” and follow the dialog to set up your project:

Set up search 8

Once you have finished the setup go into your project and click on “API Keys”:

Set up search 9

Add API Keys to Simply Static

Here you can copy the necessary information to fill out the fields in Simply Static -> Settings -> Search -> Algolia:

Set up search 10

Add the Application ID, Admin API Key, and Search-Only API Key from your project.

Add the name of the index you have used while setting up the index in your Algolia account.