# Search index with elasticlunr # Create a search index which can be served statically along the # static HTML pages to staticlunr.js. # generate JSON dynamically with a JSON output generator, # see https://halfelf.org/2017/hugos-making-json/ #curl http://localhost:1313/index.json > posts.json curl http://www.andreasbaumann.cc/index.json > posts.json # we need nodejs and npm npm install JSONStream event-stream # use posts.json in a | node create_index.js pipeline # -> results in posts_index.json ./create_index cp posts.index ../../static/index/. # add as static contents to hugo site # load from JS search code on demand (first query) if possible, # if small, do it immediatelly when loading the search widget.