Getting Started
Prerequisites
Section titled “Prerequisites”You will need to have a Starlight website set up. If you don’t have one yet, you can follow the “Getting Started” guide in the Starlight docs to create one.
Installation
Section titled “Installation”-
starlight-telescopeis a Starlight plugin. Install it by running the following command in your terminal:Terminal window npm install starlight-telescopeTerminal window pnpm add starlight-telescopeTerminal window yarn add starlight-telescope -
Configure the plugin in your Starlight configuration in the
astro.config.mjsfile.astro.config.mjs import starlight from '@astrojs/starlight'import { defineConfig } from 'astro/config'import starlightTelescope from 'starlight-telescope'export default defineConfig({integrations: [starlight({plugins: [starlightTelescope()],title: 'My Docs',}),],}) -
Start the development server to preview the plugin in action.
Once installed, press Ctrl+/ (or Cmd+/ on Mac) to open the search modal.
Keyboard Navigation
Section titled “Keyboard Navigation”| Key | Action |
|---|---|
| Arrow Down | Move to next result |
| Arrow Up | Move to previous result |
| Enter | Navigate to selected page |
| Space | Pin/unpin selected page |
| Escape | Close the modal |
Basic Configuration
Section titled “Basic Configuration”Customize the plugin by passing options:
starlightTelescope({ // Use Ctrl+K / Cmd+K instead shortcut: { key: 'k', ctrl: true, meta: true },
// Show more recent pages recentPagesCount: 10,
// Adjust search sensitivity fuseOptions: { threshold: 0.4 },})Next Steps
Section titled “Next Steps” Configuration All configuration options
Keyboard Shortcuts Customize shortcuts
Features Search, pins, and recent pages
Styling Guide Theme customization