StaticSearch
(updated )
213 words, 2-minute read
StaticSearch is a simple search engine you can add to any static website. It uses client-side JavaScript and JSON data files so there is no need for back-end server technologies or a database.
Try StaticSearch: click the search icon in the header or press Ctrl | Cmd + K
StaticSearch works well with Publican sites but you can use it on any static website no matter how it’s generated. It works best on English language sites, but most Latin-based (a, b, c … z) languages will work.
Using StaticSearch is a two-step process:
Index a directory containing your static website files
You can index from the command line or in any Node.js project using configuration options on the command line, environment variable, or API properties, e.g.
terminal
npx staticsearchAdd a search facility to your website
You can use a web component, bind module, or the search API, e.g.
HTML excerpt
<script type="module" src="/search/staticsearch-component.js"></script> <static-search> <p>search</p> </static-search>
The following pages provide full documentation. See also: