Skip to content

Commit 5436263

Browse files
authored
Add Algolia (#154)
1 parent 74c7d1c commit 5436263

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

mirror-docs/docusaurus.config.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,38 @@ const config = {
156156
textColor: '#06011F',
157157
isCloseable: true,
158158
},
159+
algolia: {
160+
// The application ID provided by Algolia
161+
appId: 'WZDUGEW4O1',
162+
163+
// Public API key: it is safe to commit it
164+
apiKey: 'cee727fb358dbae0ef4cb1c3f4b1da52',
165+
166+
indexName: 'themirror',
167+
168+
// Optional: see doc section below
169+
contextualSearch: true,
170+
171+
// 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.
172+
externalUrlRegex: 'themirror.space|docs.themirror.space',
173+
174+
// 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
175+
replaceSearchResultPathname: {
176+
from: '/docs/', // or as RegExp: /\/docs\//
177+
to: '/',
178+
},
179+
180+
// Optional: Algolia search parameters
181+
searchParameters: {},
182+
183+
// Optional: path for search page that enabled by default (`false` to disable it)
184+
searchPagePath: 'search',
185+
186+
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
187+
insights: true,
188+
189+
//... other Algolia params
190+
},
159191
prism: {
160192
theme: lightCodeTheme,
161193
darkTheme: {

0 commit comments

Comments
 (0)