Getting Started with Paligo

Using Algolia Search in HTML5

If you need more advanced search options than the default search, you have the option of using Algolia search.

This search requires that you have an Algolia account, and a couple of steps to enable it, but it offers a lot of powerful features out of the box, and can also be customized if needed (paid service). 

Algolia search does not require a crawler to index your site, so it works even if your site is behind authentication.

Note

If you start on a trial Algolia account, you need to either choose the Free plan as soon as possible, or purchase a paid plan, as the Algolia trial does not automatically convert to the Free plan, and the search could otherwise be disabled when the trial expires.

You need to have an Algolia account (https://www.algolia.com), and go to the Integration settings in Paligo and add your Search Only Key, and Application Id from your Algolia account.

Note

The Search Only Key is safe to use, it's the Admin API Key you should always keep secret.

When you have made your settings, do the following to enable the search in your output.

  1. Create an HTML5 layout (or modify an existing one), and set it to use Algolia search in the Layout Editor.

  2. Publish your publication to HTML5.

  3. Go to the folder out/en/js/algolia. Copy the name of the file, without the extension.

  4. Create an index in Algolia dashboard.

  5. Give the index the same name as the json file.

  6. Upload the json file.

  7. Make the following settings.

    1. In Display tab:

      Tip

      You have several options to customize your search here as it fits your purposes. For instance, you may want to set the "Attribute for distinct" to "url" instead, if you have the same topics reused in the same publication.

    2. In Ranking tab:

Your search should now work in your published HTML5 content. If you re-publish, remember to update the index again with the new json file produced.

Note

If you have a previous customization stylesheet for your HTML5 output, you may have to contact support to make sure it's compatible with the Algolia search, or if it needs a modification.