Skip to content

Commit a667c72

Browse files
mnonnenmachersschuberth
authored andcommitted
docs(website): Replace Algolia with local search
Replace the Algolia search with docusaurus-search-local [1] to not depend on an external service for the search function. The same plugin is already successfully being used on the ORT Server website [2]. [1]: https://github.com/easyops-cn/docusaurus-search-local [2]: https://eclipse-apoapsis.github.io/ort-server/search/ Signed-off-by: Martin Nonnenmacher <[email protected]>
1 parent 5162e66 commit a667c72

File tree

3 files changed

+504
-11
lines changed

3 files changed

+504
-11
lines changed

website/docusaurus.config.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,21 @@ const config = {
5555
],
5656
],
5757

58+
themes: [
59+
[
60+
'@easyops-cn/docusaurus-search-local',
61+
{
62+
hashed: true,
63+
indexBlog: false,
64+
docsDir: ['docs'],
65+
docsRouteBasePath: ['/docs'],
66+
searchResultLimits: 15,
67+
searchResultContextMaxLength: 200,
68+
explicitSearchResultPath: true,
69+
},
70+
],
71+
],
72+
5873
themeConfig:
5974
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
6075
({
@@ -136,17 +151,6 @@ const config = {
136151
darkTheme: darkCodeTheme,
137152
additionalLanguages: ['bash', 'batch'],
138153
},
139-
algolia: {
140-
// The application ID provided by Algolia.
141-
appId: 'GBVAB0K8M8',
142-
143-
// The public API key, safe to commit.
144-
apiKey: '4f04967a5a1f4b277d59d741a077affd',
145-
146-
indexName: 'oss-review-toolkit',
147-
contextualSearch: true,
148-
searchPagePath: 'search',
149-
},
150154
}),
151155
};
152156

0 commit comments

Comments
 (0)