
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
@morsels/search-ui
Advanced tools
A complete and more scalable pre-built index approach to client-side search.
j/rsEasy, precise, efficient and accessible client-side search for static sites.
Morsels is a complete client-side search solution tailored for static sites, including a search user interface and library that depends on a pre-built index generated by a command-line tool.

Not convinced yet? Check out the demos here as well!
Morsels' aim is to provide an easy to set up, yet feature-rich, and efficient search solution for static sites and/or static site generators.
The indexing tool supports a few other file formats (.json, .csv, .pdf, .html) as well, which can help support more custom data requirements (e.g. linking to another domain).
Powering static site search with Morsels is extremely easy, and requires just a folder of your HTML files! Titles, links, headings, etc. are automatically sourced, assuming your folder structure follows how your site's pages are layed out as well.
There are two options here:
cargo install morsels_indexer --vers 0.2.6.Run the executable as such, replacing <source-folder-path> with the relative or absolute folder path of your source html files, and <output-folder-path> with your desired index output folder.
morsels <source-folder-path> <output-folder-path>
If you are using the binaries, replace morsels with the appropriate executable name.
Add the following resources to your pages:
<!-- Search UI script -->
<script src="https://cdn.jsdelivr.net/gh/ang-zeyu/morsels@v0.2.6/packages/search-ui/dist/search-ui.bundle.js"></script>
<!-- Search UI css, this provides some basic styling for the search dropdown, and can be omitted if desired -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ang-zeyu/morsels@v0.2.6/packages/search-ui/dist/search-ui-light.css" />
Give any <input> element in your page an id of morsels-search, then call:
initMorsels({
searcherOptions: {
// Output folder url specified as the second parameter in the cli command
// Urls like '/output/' will work as well
url: 'http://<your-domain>/output/',
},
uiOptions: {
// Input / source folder url, specified as the first parameter in the cli command
sourceFilesUrl: 'http://<your-domain>/source/',
}
});
Please check out the documentation next, which also uses Morsels for its search function.
This project is MIT licensed.
FAQs
A complete and more scalable pre-built index approach to client-side search.
We found that @morsels/search-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.