diff --git a/docusaurus.config.js b/docusaurus.config.js index 675e29aa..0d0d37fe 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -186,6 +186,7 @@ const config = { ], ], themes: [ + 'docusaurus-theme-search-typesense' // '@saucelabs/theme-github-codeblock' ], @@ -302,23 +303,40 @@ const config = { darkTheme: darkCodeTheme, additionalLanguages: ['java', 'json'], }, - algolia: { - appId: "F6Z9JYN7SD", - - // Public API key: it is safe to commit it - apiKey: "4b16b443762534d364363a6dee383487", - - indexName: "prod_docs", - - // Optional: see doc section below - contextualSearch: false, - - // 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. - // externalUrlRegex: "external\\.com|domain\\.com", + typesense:{ + typesenseCollectionName: 'orkes-content', + typesenseServerConfig: { + nodes: [ + { + host: 'fdzpgxo5jqkuec0sp-1.a1.typesense.net', + port: 443, + protocol: 'https', + }, + ], + apiKey: 'Mv2LnFhyvlKpQHlIYzKtwqrOLYjasQV8', + }, + typesenseSearchParameters: {}, - // Optional: Algolia search parameters - // searchParameters: {}, - }, + // Optional + contextualSearch: true, + } + // algolia: { + // appId: "F6Z9JYN7SD", + // + // // Public API key: it is safe to commit it + // apiKey: "4b16b443762534d364363a6dee383487", + // + // indexName: "prod_docs", + // + // // Optional: see doc section below + // contextualSearch: false, + // + // // 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. + // // externalUrlRegex: "external\\.com|domain\\.com", + // + // // Optional: Algolia search parameters + // // searchParameters: {}, + // }, }), }; diff --git a/package.json b/package.json index f0dfddf1..8f33651a 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "classnames": "^2.3.1", "clsx": "^1.1.1", "docusaurus-plugin-remote-content": "3.1.0", + "docusaurus-theme-search-typesense": "^0.7.0-0", "file-loader": "^6.2.0", "prism-react-renderer": "^1.2.1", "react": "^17.0.1", diff --git a/search.config.json b/search.config.json index e57a1747..be124c5c 100644 --- a/search.config.json +++ b/search.config.json @@ -1,5 +1,5 @@ { - "index_name": "prod_docs", + "index_name": "orkes-content", "start_urls": ["https://orkes.io/content/"], "selectors": { "lvl0": { diff --git a/yarn.lock b/yarn.lock index b8f105b0..d05827ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3613,7 +3613,7 @@ axios@^0.25.0: dependencies: follow-redirects "^1.14.7" -axios@^0.26.1: +axios@^0.26.0, axios@^0.26.1: version "0.26.1" resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== @@ -4634,6 +4634,26 @@ docusaurus-plugin-remote-content@3.1.0: pretty-ms "^7.0.1" rimraf "^3.0.2" +docusaurus-theme-search-typesense@^0.7.0-0: + version "0.7.0-0" + resolved "https://registry.yarnpkg.com/docusaurus-theme-search-typesense/-/docusaurus-theme-search-typesense-0.7.0-0.tgz#b419f933124f9c1474c84a3032f86befed45f1a2" + integrity sha512-Zw0EbMMXStRqUGyd8pFL4V/al8eIrcRRv/Oae7UwrcC+7bjBFzclslwttU8PIHVf7Hqxi7Z8vGCKwMhUyhRLVg== + dependencies: + "@docusaurus/logger" "2.1.0" + "@docusaurus/plugin-content-docs" "2.1.0" + "@docusaurus/theme-translations" "2.1.0" + "@docusaurus/utils" "2.1.0" + "@docusaurus/utils-validation" "2.1.0" + algoliasearch-helper "^3.10.0" + clsx "^1.2.1" + eta "^1.12.3" + fs-extra "^10.1.0" + lodash "^4.17.21" + tslib "^2.4.0" + typesense-docsearch-react "^0.2.3" + typesense-instantsearch-adapter "^2.4.2-1" + utility-types "^3.10.0" + dom-converter@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" @@ -6291,6 +6311,11 @@ lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +loglevel@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.8.0.tgz#e7ec73a57e1e7b419cb6c6ac06bf050b67356114" + integrity sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA== + loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -8608,6 +8633,37 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +typesense-docsearch-css@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/typesense-docsearch-css/-/typesense-docsearch-css-0.3.0.tgz#3b96be6336da4ae1d42ccdb96543072c97c419bf" + integrity sha512-+/t9Jz5dwH52Xpk9ikpJaQZs+McX/a4aY+8Iw+IiD9yu9+JJddEA5RYjBgkcQ140gUtp9L213z/V0g2bC3B/hw== + +typesense-docsearch-react@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/typesense-docsearch-react/-/typesense-docsearch-react-0.2.3.tgz#a6d76ba59d214f687be6906f856d2507a5961b75" + integrity sha512-2eODhYFk3KLhwEF+shzcTsiB0zU8GefPFZGzNlGdwdUJiUxjh8SgS7VtylXGdKQZxh33wbWN4wr94CG2WxcIIw== + dependencies: + "@algolia/autocomplete-core" "1.7.1" + "@algolia/autocomplete-preset-algolia" "1.7.1" + typesense "^1.4.0-3" + typesense-docsearch-css "^0.3.0" + typesense-instantsearch-adapter "^2.4.2-1" + +typesense-instantsearch-adapter@^2.4.2-1: + version "2.4.2-1" + resolved "https://registry.yarnpkg.com/typesense-instantsearch-adapter/-/typesense-instantsearch-adapter-2.4.2-1.tgz#922aa2c84fbe027a15bb357db9378687c04ca855" + integrity sha512-reo1riIstYeHmg0g4amaZNY2wcBPORDIuanMsbIca3G6kMUxr1KyG+4pv8/qt4b+o/cp6AX72aoV6zbcdrhpYg== + dependencies: + typesense "^1.4.0-1" + +typesense@^1.4.0-1, typesense@^1.4.0-3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/typesense/-/typesense-1.4.0.tgz#30fabfee5b70839ecdfb2810658b635db75707f4" + integrity sha512-+Y6WYNB3+z5bR1/F5AfHQyqdeKGOZW0k2l0HSFgCFl+3wo6oY42lAhJG2JZk6k8ux3j4866IyruKsCG5NtlHMQ== + dependencies: + axios "^0.26.0" + loglevel "^1.8.0" + ua-parser-js@^0.7.30: version "0.7.31" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.31.tgz#649a656b191dffab4f21d5e053e27ca17cbff5c6"