Skip to content

Commit 0f5a550

Browse files
author
shuai
committed
feat: support algolia search
1 parent 5ff2fc2 commit 0f5a550

6 files changed

Lines changed: 135 additions & 50 deletions

File tree

docusaurus.config.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ const config = {
9090
respectPrefersColorScheme: false,
9191
},
9292
algolia: {
93-
appId: 'ALIEPVY5A0',
94-
apiKey: 'a7f83132b511548fc8fbc44f83239bf9',
95-
indexName: 'answer',
96-
container: '### REPLACE ME WITH A CONTAINER (e.g. div) ###',
93+
appId: '3HYC7VUYNM',
94+
apiKey: 'a5ab35036f4ec013766e0d65f4f9a1ad',
95+
indexName: 'answer_apache_org_3hyc7vuynm_pages',
96+
contextualSearch: true,
9797
debug: true
9898
},
9999
navbar: {
@@ -151,7 +151,7 @@ const config = {
151151
{
152152
label: 'Roadmap',
153153
to: 'https://github.com/apache/answer/projects',
154-
},
154+
}
155155
],
156156
},
157157
{
@@ -183,13 +183,18 @@ const config = {
183183
position: 'right',
184184
className: 'bi bi-github navbar-icon-link',
185185
},
186+
{
187+
type: 'search',
188+
position: 'right',
189+
},
186190
],
187191
},
188192
prism: {
189193
theme: lightCodeTheme,
190194
darkTheme: darkCodeTheme,
191195
},
192196
image: 'img/head-icon.png',
197+
themes: ['@docusaurus/theme-search-algolia'],
193198
}),
194199

195200
stylesheets: [

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@docusaurus/theme-classic": "^3.1.1",
3131
"@docusaurus/theme-common": "^3.1.1",
3232
"@docusaurus/theme-mermaid": "^3.1.1",
33+
"@docusaurus/theme-search-algolia": "3.1.1",
3334
"@docusaurus/utils": "^3.1.1",
3435
"@mdx-js/react": "^3.0.0",
3536
"@popperjs/core": "^2.11.8",

0 commit comments

Comments
 (0)