The theme recommends using the Algolia CLI to upload data to Algolia.
The data upload requires using the algolia objects
command, which expects the uploaded file to be in ndjson format. By default, Hugo doesn’t generate ndjson format data files. However, this theme supports generating ndjson format data files by default, making it convenient to use the algolia objects
command to upload data to Algolia.
First, make sure you have installed the Algolia CLI.
hugo
algolia.ndjson
file in the public
directory and upload it to Algolia.algolia objects import 'your_index_name' -F ./public/algolia.ndjson -p 'your_prifile_name'
For details on generating ndjson files in Hugo, you can refer to the article How to output ndjson format files directly in Hugo and upload to Algolia .