Skip to content

Commit 3aa23bf

Browse files
committed
website: updates
1 parent 4c768ce commit 3aa23bf

File tree

1 file changed

+40
-19
lines changed

1 file changed

+40
-19
lines changed

website/docusaurus.config.ts

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -397,25 +397,46 @@ const config: Config = {
397397
theme: prismThemes.github,
398398
darkTheme: prismThemes.dracula,
399399
},
400-
// algolia: {
401-
// // https://docsearch.algolia.com/docs/docsearch-v3/
402-
// appId: "KIDD7R4CL1",
403-
// apiKey: "ca2ffc431941284609f2d50202fc5506",
404-
// indexName: "xpackio",
405-
406-
// // It ensures that search results are relevant to the current
407-
// // language and version. Enabled by default.
408-
// contextualSearch: false, // true,
409-
// // Optional: Replace parts of the item URLs from Algolia.
410-
// // Useful when using the same search index for multiple deployments
411-
// // using a different baseUrl. You can use regexp or string in the
412-
// // `from` param. For example: localhost:3000 vs myCompany.com/docs
413-
// // replaceSearchResultPathname: undefined,
414-
// // Optional: Algolia search parameters
415-
// searchParameters: {},
416-
// // Optional: path for search page that enabled by default (`false` to disable it)
417-
// searchPagePath: false, // 'search',
418-
// },
400+
// https://docusaurus.io/docs/search#using-algolia-docsearch
401+
// https://docsearch.algolia.com/docs/docsearch-v3/
402+
algolia: {
403+
// The application ID provided by Algolia
404+
appId: "KIDD7R4CL1",
405+
406+
// Public API key: it is safe to commit it
407+
apiKey: "ca2ffc431941284609f2d50202fc5506",
408+
409+
indexName: "xpackio",
410+
411+
// It ensures that search results are relevant to the current
412+
// language and version. Enabled by default.
413+
contextualSearch: true,
414+
415+
// Optional: Specify domains where the navigation should occur
416+
// through window.location instead on history.push. Useful when
417+
// our Algolia config crawls multiple documentation sites and
418+
// we want to navigate with window.location.href to them.
419+
// externalUrlRegex: 'external\\.com|domain\\.com',
420+
externalUrlRegex: 'xpack\\.github\\.io|xpack-dev-tools\\.github\\.io',
421+
422+
// Optional: Replace parts of the item URLs from Algolia.
423+
// Useful when using the same search index for multiple deployments
424+
// using a different baseUrl. You can use regexp or string in the
425+
// `from` param. For example: localhost:3000 vs myCompany.com/docs
426+
// replaceSearchResultPathname: {
427+
// from: '/docs/', // or as RegExp: /\/docs\//
428+
// to: '/',
429+
// },
430+
431+
// Optional: Algolia search parameters
432+
searchParameters: {},
433+
434+
// Optional: path for search page that enabled by default (`false` to disable it)
435+
searchPagePath: 'search',
436+
437+
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
438+
insights: false,
439+
},
419440
} satisfies Preset.ThemeConfig,
420441

421442
customFields: customFields,

0 commit comments

Comments
 (0)