/jamstack-search-example

Example of search functionality for JAMstack sites using pre-built Lambda function and Lunrjs

Primary LanguageHTML

JAMstack Search Example

Example of search functionality for JAMstack sites using Hugo, pre-built Netlify Function (Lambda) and Lunrjs

Build

npm run build

Overview

  1. During Hugo build a dump of all content is produced: [1] [2]
  2. This dump is later used to build a search index file using lunrjs [3]
  3. Finally, search index is embodied into Netlify Function and deployed along the site [4]
  4. That's it, after your site is deployed you can query a Netlify Function: https://wizardly-pasteur-c5fb53.netlify.com/.netlify/functions/search?q=one

TODO

[ ] Implement example front-end search functionality in theme