Skip to content

Commit 2614c17

Browse files
committed
Switch to Algolia Search
1 parent 5b871d7 commit 2614c17

1 file changed

Lines changed: 50 additions & 17 deletions

File tree

docusaurus.config.js

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const config = {
7474
}),
7575
],
7676
],
77-
themes: ['docusaurus-theme-search-typesense'],
77+
// themes: ['docusaurus-theme-search-typesense'],
7878
themeConfig:
7979
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
8080
({
@@ -115,26 +115,59 @@ const config = {
115115
},
116116
],
117117
},
118-
typesense: {
119-
typesenseCollectionName: 'websoft9', // Replace with your own doc site's name. Should match the collection name in the scraper settings.
120-
// typesenseCollectionName: 'docusaurus-2',
121-
typesenseServerConfig: {
122-
nodes: [
123-
{
124-
host: 'search.www.websoft9.com',
125-
port: 443,
126-
protocol: 'https',
127-
},
128-
],
129-
apiKey: 'cJ9XqddokC3OCRdx1SFQRv+uFj5QHYOT',
130-
},
131-
// Optional: Typesense search parameters: https://typesense.org/docs/0.21.0/api/documents.md#search-parameters
132-
typesenseSearchParameters: {},
118+
// typesense: {
119+
// typesenseCollectionName: 'websoft9', // Replace with your own doc site's name. Should match the collection name in the scraper settings.
120+
// // typesenseCollectionName: 'docusaurus-2',
121+
// typesenseServerConfig: {
122+
// nodes: [
123+
// {
124+
// host: 'search.www.websoft9.com',
125+
// port: 443,
126+
// protocol: 'https',
127+
// },
128+
// ],
129+
// apiKey: 'cJ9XqddokC3OCRdx1SFQRv+uFj5QHYOT',
130+
// },
131+
// // Optional: Typesense search parameters: https://typesense.org/docs/0.21.0/api/documents.md#search-parameters
132+
// typesenseSearchParameters: {},
133+
134+
// // Optional
135+
// contextualSearch: true,
136+
// },
137+
algolia: {
138+
// The application ID provided by Algolia
139+
appId: 'NA4GDUSQ4H',
140+
141+
// Public API key: it is safe to commit it
142+
apiKey: 'b08bd00265bc22ae49e3a6acd38868c8',
133143

134-
// Optional
144+
indexName: 'support-websoft9',
145+
146+
// Optional: see doc section below
135147
contextualSearch: true,
148+
149+
// 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.
150+
externalUrlRegex: 'external\\.com|domain\\.com',
151+
152+
// 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
153+
replaceSearchResultPathname: {
154+
from: '/docs/', // or as RegExp: /\/docs\//
155+
to: '/',
156+
},
157+
158+
// Optional: Algolia search parameters
159+
searchParameters: {},
160+
161+
// Optional: path for search page that enabled by default (`false` to disable it)
162+
searchPagePath: 'search',
163+
164+
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
165+
insights: false,
166+
167+
//... other Algolia params
136168
},
137169

170+
138171
footer: {
139172
style: 'dark',
140173
links: [

0 commit comments

Comments
 (0)