Skip to content

Commit

Permalink
Algolia search
Browse files Browse the repository at this point in the history
  • Loading branch information
“nico-shishkin” committed Nov 1, 2023
1 parent e8beb95 commit c19211d
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ const config = {
},

plugins: [
[
'@cmfcmf/docusaurus-search-local',
{
// Add your options here, if any
},
],

[
'docusaurus-plugin-includes',
{
Expand Down Expand Up @@ -101,6 +96,35 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
algolia: {
// The application ID provided by Algolia
appId: 'WJRQN4A3SB',

// Public API key: it is safe to commit it
apiKey: '062ce43eeca6e9f1410d3d2f435765c5',

indexName: 'GAVMESY4FI',

// Optional: see doc section below
contextualSearch: true,

// 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.
externalUrlRegex: 'external\\.com|domain\\.com',

// 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
replaceSearchResultPathname: {
from: '/docs/', // or as RegExp: /\/docs\//
to: '/',
},

// Optional: Algolia search parameters
searchParameters: {},

// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: 'search',

//... other Algolia params
},
docs: {
sidebar: {
hideable: true,
Expand Down

0 comments on commit c19211d

Please sign in to comment.