V0.3.0
Latest- feat: add arrow key navigation to search palette and create CHANGELOG.md
- @deadeye021 made their first contribution in https://github.com/gtref/SatisPalette/pull/2
SHA-256 4727d130224e1e19b008d75bfb74a996cf9aaa641ca50d1ad481548e1d6ff134A small, client-side command palette for searching pages on a website. Visitors open it with Ctrl+K, search page titles and text, and follow a result.
This website's own Ctrl+K search follows the same idea. SatisPalette is the small, reusable version you can put on any site.
Copy widget.js, create a search.json file, and add this before the widget script on each page:
<script>
window.CommandPaletteConfig = {
data: "./search.json",
theme: "light"
};
</script>
<script src="./widget.js"></script>theme is "light" or "dark". If you leave out data, the widget looks for /search.json at the site root.
The index is a JSON list of pages. Each page needs a url, and a title is optional.
[
{ "title": "Home", "url": "./index.html" },
{ "title": "Documentation", "url": "./docs.html" }
]At start-up the widget fetches each page and indexes its title and visible text in the browser. Serve your site over HTTP(S) and make sure the pages can be fetched from where the widget runs.
Read live from the repository, so it is always the current plan.
SHA-256 4727d130224e1e19b008d75bfb74a996cf9aaa641ca50d1ad481548e1d6ff134SHA-256 7b2314afa8f5aa992b76cc4d51a989ef8da9968dd630e41b207a446360101f5fSHA-256 d7d8122b9477430c1c69da5acd011eb9008008311b59d71cf40dbc1ad2a228e4