Skip to content

Commit

Permalink
Convert to algolia search (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
RelativeSure authored Mar 5, 2024
1 parent 3c086a9 commit 3b9f05c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Dependencies
/node_modules
bun.lockb
.env

# Production
/build
Expand Down
28 changes: 8 additions & 20 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,6 @@ export default {
favicon: 'img/favicon.ico',

plugins: [
[require.resolve("@cmfcmf/docusaurus-search-local"),
{
indexDocs: true,
indexDocSidebarParentCategories: 2,
indexBlog: false,
indexPages: false,
language: "en",
style: undefined,
maxSearchResults: 8,
lunr: {
tokenizerSeparator: /[\s\-]+/,
b: 0.75,
k1: 1.2,
titleBoost: 5,
contentBoost: 1,
tagsBoost: 3,
parentCategoriesBoost: 2,
}
},
],
require.resolve("docusaurus-plugin-image-zoom"),
],

Expand Down Expand Up @@ -92,6 +72,14 @@ export default {
}
],
},
algolia: {
appId: process.env.ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_API_KEY,
indexName: process.env.ALGOLIA_INDEX_NAME,
contextualSearch: true,
searchParameters: {},
searchPagePath: 'search',
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "1.1.0",
"@docusaurus/core": "3.1.1",
"@docusaurus/plugin-sitemap": "3.1.1",
"@docusaurus/preset-classic": "3.1.1",
Expand Down

0 comments on commit 3b9f05c

Please sign in to comment.