Skip to content

Commit

Permalink
Switch search to lunr
Browse files Browse the repository at this point in the history
Local search without a 3rd party requirement

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 committed Mar 15, 2024
1 parent 6a49866 commit 1b7209b
Show file tree
Hide file tree
Showing 3 changed files with 467 additions and 94 deletions.
11 changes: 3 additions & 8 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ module.exports = {
onBrokenMarkdownLinks: "warn",
trailingSlash: "true",
favicon: "img/favicon.ico",
organizationName: "Mondoo", // Usually your GitHub org/user name.
projectName: "Docs", // Usually your repo name.
organizationName: "Mondoo",
projectName: "Docs",

plugins: [
[
Expand Down Expand Up @@ -174,6 +174,7 @@ module.exports = {
},
},
],
require.resolve("docusaurus-lunr-search"),
[
require.resolve("docusaurus-gtm-plugin"),
{
Expand All @@ -190,12 +191,6 @@ module.exports = {
hideable: true,
},
},
algolia: {
apiKey: "ALGOLIA_API_KEY",
indexName: "mondoo",
contextualSearch: false, // activate if we use versionized docs
appId: "ALGOLIA_APP_ID",
},
prism: {
theme: themes.nightOwl,
additionalLanguages: [
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@algolia/client-search": "^4.22.0",
"@docusaurus/core": "^3.0.0",
"@docusaurus/plugin-client-redirects": "^3.0.0",
"@docusaurus/preset-classic": "^3.0.0",
"@docusaurus/theme-search-algolia": "^3.0.0",
"@fontsource/roboto": "^5.0.7",
"@mdx-js/react": "^3.0.1",
"@stackql/docusaurus-plugin-hubspot": "^1.0.0",
Expand All @@ -27,6 +25,7 @@
"clsx": "^2.1.0",
"cross-fetch": "^4.0.0",
"docusaurus-gtm-plugin": "^0.0.2",
"docusaurus-lunr-search": "^3.3.2",
"file-loader": "^6.2.0",
"got": "^13.0.0",
"minimist": "^1.2.8",
Expand All @@ -38,7 +37,6 @@
"react": "^18.0.1",
"react-dom": "^18.0.1",
"react-loadable": "^5.5.0",
"search-insights": "^2.13.0",
"terser": "5.29.2",
"url-loader": "^4.1.1",
"webpack": "^5.90.3",
Expand Down
Loading

0 comments on commit 1b7209b

Please sign in to comment.