SatisPalette

DOCUMENTATION

Find your way around.

SatisPalette is a tiny, client-side command palette that helps visitors find and open pages on your website.

Open with Ctrl K
Search your own pages
Small, framework-free widget

01 · INSTALLATION

Up and running in a few minutes.

Add the widget and its JSON index to the site you want to search.

1. Add the files

Copy widget.js to your website and create a search.json file as described in the search index guide.

2. Configure and load the widget

Set the index URL before loading the script. The URL can be relative to the current page or start at your site's root.

HTML
<script>
  window.CommandPaletteConfig = {
    data: "./search.json"
  };
</script>
<script src="./widget.js"></script>

3. Serve your site over HTTP

The widget uses fetch() to load the index and its pages. Use a local web server or your production host; opening the page as a file:// URL is not supported.

Pages must be available from the same origin as your site, or their server must allow the requests with CORS.

02 · CONTENT

Choose what people can search.

The index is a JSON array. Add one entry for every page you want the palette to include.

search.json
[
  {
    "title": "Getting started",
    "url": "/guide/getting-started.html"
  },
  {
    "title": "FAQ",
    "url": "/faq.html"
  }
]
FieldRequiredDescription
url Yes Page URL to fetch and include in search.
title No Display title. Defaults to the page title, then its URL.
  • Root-relative URLs like /guide/start.html start at your domain's root.
  • Relative URLs like ./guide/start.html are resolved from the page that loaded the widget.
  • Only add pages that should be visible in search. The widget indexes their title and visible body text.

03 · OPTIONS

Point the widget at your index.

SatisPalette has one setting, data, which is the URL of your JSON index.

Configuration
window.CommandPaletteConfig = {
  data: "/assets/search.json"
};

Assign window.CommandPaletteConfig before the widget.js script. If omitted, the widget requests /search.json from your site root.

04 · USING THE PALETTE

Search and jump to a result.

The palette searches the titles and visible text of indexed pages.

Open or closeCtrlK
Close the paletteEsc
Go to a resultSelect a result

Search is case-insensitive substring matching, and the widget shows up to ten results. Arrow-key navigation and selecting a result with Enter are not currently supported.

05 · TROUBLESHOOTING

A few things to check.

The palette opens but shows no results

Check that the configured index URL returns valid JSON, each entry has a valid url, and the query appears in a page title or visible body text.

An indexed page is missing

Check the browser console and network panel. Confirm the page URL is correct, the page is available, and any cross-origin server allows the request with CORS headers.

Local files do not load

Use a local HTTP server instead of opening the page directly with a file:// URL. The browser restricts fetch requests from local files.

Load failures are reported in the browser's developer console under [CommandPalette].