Hugo LoveIt with Algolia Search

I’ve made my personal blog with LoveIt theme and enabled Algolia search. Might be helpful for those who are trying to add Algolia search to their HUGO page.



I just followed your article about adding Algolia to a Hugo site.

You mentioned that it was only a memo, but I would need more precision.

To start with, I did create my account on Algolia.
Then launched the npm command to install hugo-algolia and I see the dependencies added.

Now I added the code mentioned in the package.json but I have a doubt about the syntax.

  "dependencies": {
    "@fullhuman/postcss-purgecss": "github:fullhuman/postcss-purgecss",
    "autoprefixer": "^10.4.14",
    "bootstrap": "^5.3.0-alpha3",
    "hugo-algolia": "^1.2.14",
    "postcss-cli": "^10.1.0"
  "scripts": {     
    "index": "hugo-algolia",     
    "index-and-send": "hugo-algolia -s" 

I normally use the clipped config files to make it clearer, but I had to merge everything because hugo-algolia only searches in a default config and even trying to add the -c option to the command, I can’t get it, but that’s not really the problem.

The problem is that when I run the npm run index command it starts an action, but never finishes.

Did I forget something?

In several older articles it has other files to configure like in the config.yaml.

baseName = "algolia"
isPlainText = true
mediaType = "application/json"
notAlternative = true

vars = ["title", "summary", "date", "publishdate", "permalink"]
params = ["tags"]

home = ["HTML", "Algolia"]

but this is my config.yaml

  index: hugo
  key: "my_key"
  appID: "my_appid"

Is it possible to confirm the syntax of my package.json fix?
To give me the main lines to manage to implement Algolia to my website?

Thanks in advance.