Skip to content

Commit cc5c468

Browse files
committed
Add search
1 parent 2c6c158 commit cc5c468

File tree

3 files changed

+504
-0
lines changed

3 files changed

+504
-0
lines changed

docusaurus.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import {themes as prismThemes} from 'prism-react-renderer';
22
import type {Config} from '@docusaurus/types';
33
import type * as Preset from '@docusaurus/preset-classic';
44

5+
// @ts-ignore
6+
import { DocSearchConfig } from '@easyops-cn/docusaurus-search-local';
7+
58
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
69

710
const config: Config = {
@@ -46,6 +49,18 @@ const config: Config = {
4649
} satisfies Preset.Options,
4750
],
4851
],
52+
themes: [
53+
[
54+
require.resolve("@easyops-cn/docusaurus-search-local"),
55+
{
56+
hashed: true,
57+
language: ["en"],
58+
highlightSearchTermsOnTargetPage: true,
59+
explicitSearchResultPath: true,
60+
docsRouteBasePath: "/",
61+
} satisfies Partial<DocSearchConfig>,
62+
],
63+
],
4964

5065
themeConfig: {
5166
image: 'img/roo-code-logo-white.png',

0 commit comments

Comments
 (0)