
Hugo static search with Algolia - sgallant
https://forestry.io/blog/search-with-algolia-in-hugo/
======
regisphilibert
Hey there! Having fun so far but I have an NPM ERR running atomic-algolia.

I am using an .env file (tried with and without quotes)

I'm starting here in case I am doing something wrong, but let me know if think
it deserves a GitHub Issue

You can check the code here (branch/search):
[https://github.com/regisphilibert/benmerde/tree/search](https://github.com/regisphilibert/benmerde/tree/search)

Here's the npm log: \--------------
/Users/cheribibi/Boulot/projets/benmerde/hugov2/node_modules/atomic-
algolia/lib/utils/getRemoteIndex.js:1 (function (exports, require, module,
__filename, __dirname) { module.exports = async function getRemoteIndex(index)
{ ^^^^^^^^ SyntaxError: Unexpected token function at createScript
(vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile
(module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at
Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at
Function.Module._load (module.js:438:3) at Module.require (module.js:497:17)
at require (internal/module.js:20:19) at Object.<anonymous>
(/Users/cheribibi/Boulot/projets/benmerde/hugov2/node_modules/atomic-
algolia/lib/update.js:9:22) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR!
benmerde@1.0.0 algolia: `atomic-algolia` npm ERR! Exit status 1
\--------------

Thanks for the post (and the help ;))

------
regisphilibert
Got the serverless webhook part. Thanks for the tool and explanation, really
easy to follow and a great help for future works!

Just one remark, about indexes.js, you write: "Update name to the name of your
index that you set up earlier, and url to yourdomain.com/algola.json,
replacing yourdomain.com with your site’s domain."

The protocole has to be included
([https://yourdomain.com](https://yourdomain.com)), not only the domain, it
makes sense because the key is "url" but the exemple provided (yourdomain.com)
and phrasing suggest otherwise.

Thanks again!

