The following allows you to easily generate an Algolia index with Hugo consisting of whatever front matter metadata you like.
There are plugins that generate indexes using NPM packages or other tools. The issue is that they don't have any context to your site configuration or Hugo's internals, so they may miss pages or index pages that should not be indexed.
Using Hugo means your index has the full context of your site available when being generated.
To generate the index you create the index's layout at layouts/_default/list.algolia.json
.