Search code examples
vue.jsconfigalgoliavuepress

VuePress - Algolia increase results


Using VuePress with Algolia quick search box.

I could not find in the documentation for Algolia how to increase the number of results shown in the dropdown list. It currently defaults to 5.

Just adding 'hitsPerPage: 10' to the algolia options in the config.js is ignored.


Solution

  • After an email with Algolia support they solved this.

    You need to add 'algoliaOptions' with the 'hitsPerPage: 10'

    algolia: {
       apiKey: 'your key',
       appId: 'your app id',
       indexName: 'your index name',
       algoliaOptions: {
         hitsPerPage: 10,
       },