Searching a Website

This is way off topic… but I am hoping someone here has done something like this before and can point me in a good direction (I have spend better part of the day on the web, and can’t find anything that seems to be what I want).

I am writing an app that analyzes the source code of a project and creates a website based on various things it finds… What I want to do is create a simple way to add a search bar that can somehow search for various key words and “jump” to the place where the word is located. I have seen evidence of modules (javascript?) that seem to take a JSON file (which I can create if required), but I can’t find any documentation on format, use etc.

There are some requirements

  • all the code must be client side. The generated HTML/webpage(s) will be local and cannot rely on remote resources.
  • the keyword list/dictionary/JSON etc can/will be generated by the same app that creates the website/html pages
  • the content being searched is Static. if changes are made, the entire site needs to be rebuilt anyways (right now it takes just a few seconds to build the site)
  • no “database” engines can be involved (no SQLite etc). Text based indexes (JSON, XML or the like is fine)

If anyone can provide enough information for me to get this going, I’ll provide a free license to the version of this app which will deal with Xojo projects (the first version will analyze Swift, followed by a version to document Xojo project, then maybe C#/ObjC)