Skip to content

Commit

Permalink
algolia -> local-search
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuafernandes committed Oct 3, 2023
1 parent 39c77b9 commit 9011094
Show file tree
Hide file tree
Showing 3 changed files with 310 additions and 24 deletions.
52 changes: 28 additions & 24 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,29 +78,23 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
algolia: {
// The application ID provided by Algolia
appId: "NSRFPEJ4NC",

// Public API key: it is safe to commit it
apiKey: "cea41b975ad6c9a01408dfda6e0061d3",

indexName: "teku",

// Optional: see doc section below
contextualSearch: true,

// 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: {},

// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: "search",

// ... other Algolia params
},
// revisit this in v3 of docusaurus that is due to go GA
// algolia: {
// // The application ID provided by Algolia
// appId: "NSRFPEJ4NC",
// // Public API key: it is safe to commit it
// apiKey: "cea41b975ad6c9a01408dfda6e0061d3",
// indexName: "teku",
// // Optional: see doc section below
// contextualSearch: true,
// // 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: {},
// // Optional: path for search page that enabled by default (`false` to disable it)
// searchPagePath: "search",
// // ... other Algolia params
// },
// announcementBar: {
// id: "announcement_bar",
// content: "⛔️ This documentation site is still under construction! 🚧",
Expand Down Expand Up @@ -442,7 +436,17 @@ const config = {
},
],
],
themes: [],
themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
({
hashed: true,
docsRouteBasePath: "/",
indexBlog: false,
}),
],
],
};

module.exports = config;
281 changes: 281 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@docusaurus/plugin-google-tag-manager": "^2.4.3",
"@docusaurus/preset-classic": "^2.4.3",
"@docusaurus/theme-common": "^2.4.3",
"@easyops-cn/docusaurus-search-local": "^0.33.6",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
Expand Down

0 comments on commit 9011094

Please sign in to comment.