Socket
Book a DemoInstallSign in
Socket

@upstash/docusaurus-theme-upstash-search

Package Overview
Dependencies
Maintainers
5
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@upstash/docusaurus-theme-upstash-search

Upstash Search component for Docusaurus.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
5
Created
Source

AI-powered search component for Docusaurus using Upstash Search.

Features

  • 🤖 AI-powered search search results based on your documentation
  • 🎨 Modern and responsive UI
  • 🌜 Dark/Light mode support

Installation

To install the package, run:

npm install @upstash/docusaurus-theme-upstash-search

To enable the searchbar, add the following to your docusaurus config file:

export default {
  themes: ['@upstash/docusaurus-theme-upstash-search'],
  // ...
  themeConfig: {
    // ...
    upstash: {
      upstashSearchRestUrl: "UPSTASH_SEARCH_REST_URL",
      upstashSearchReadOnlyRestToken: "UPSTASH_SEARCH_READ_ONLY_REST_TOKEN",
      upstashSearchIndexName: "UPSTASH_SEARCH_INDEX_NAME",
    },
  },
};

The default index name is docusaurus. You can override it by setting the upstashSearchIndexName option.

You can fetch your URL and read only token from Upstash Console. Make sure to use the read only token!

If you do not have a search database yet, you can create one from Upstash Console. Make sure to use Upstash generated embedding model.

Indexing Your Docs

To index your documentation, create a .env file with the following environment variables and run npx index-docs-upstash.

UPSTASH_SEARCH_REST_URL=
UPSTASH_SEARCH_REST_TOKEN=
UPSTASH_SEARCH_INDEX_NAME=
DOCS_PATH=

You can fetch your URL and token from Upstash Console. This time do not use the read only token since we are upserting data.

The indexing script looks for documentation in the docs directory by default. You can specify a different path using the DOCS_PATH option.

The default index name is docusaurus. You can override it by setting the UPSTASH_SEARCH_INDEX_NAME option. Make sure the name you set while indexing matches with your themeConfig upstashSearchIndexName option.

FAQs

Package last updated on 07 Jul 2025

Did you know?

Socket

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.

Install

Related posts