Skip to content

Commit 5e97daa

Browse files
committed
add search
1 parent 714335c commit 5e97daa

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docusaurus.config.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,38 @@ const config: Config = {
131131
theme: prismThemes.github,
132132
darkTheme: prismThemes.dracula,
133133
},
134+
algolia: {
135+
// The application ID provided by Algolia
136+
appId: 'A4JYP2MKXW',
137+
138+
// Public API key: it is safe to commit it
139+
apiKey: '0672316b5c456df1af027f3b21e7c60c',
140+
141+
indexName: 'clsframeworkio',
142+
143+
// Optional: see doc section below
144+
contextualSearch: true,
145+
146+
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
147+
externalUrlRegex: 'external\\.com|domain\\.com',
148+
149+
// Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
150+
replaceSearchResultPathname: {
151+
from: '/docs/', // or as RegExp: /\/docs\//
152+
to: '/docs/',
153+
},
154+
155+
// Optional: Algolia search parameters
156+
searchParameters: {},
157+
158+
// Optional: path for search page that enabled by default (`false` to disable it)
159+
searchPagePath: 'search',
160+
161+
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
162+
insights: false,
163+
164+
//... other Algolia params
165+
},
134166
} satisfies Preset.ThemeConfig,
135167
markdown: {
136168
mermaid: true,

0 commit comments

Comments
 (0)