Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Latest commit

 

History

History
39 lines (27 loc) · 797 Bytes

README.md

File metadata and controls

39 lines (27 loc) · 797 Bytes

Provides local search to your documentation site

Uses flexsearch.

Installing

npm i vitepress-plugin-search flexsearch -D

Add the plugin

//vite.config.ts
import { SearchPlugin } from "vitepress-plugin-search";
import { defineConfig } from "vite";

//default options
var options = {
  ...flexSearchIndexOptions,
  previewLength: 62,
  buttonLabel: "Search",
  placeholder: "Search docs",
};

export default defineConfig({
  plugins: [SearchPlugin(options)],
});

Options

Accept FlexSearch Index Options

Multi language support

Provided by flexsearch

See chinese settings for example