Skip to content

Commit

Permalink
feat: add search (#93)
Browse files Browse the repository at this point in the history
* add algolia search

* update comment
  • Loading branch information
raulb committed May 24, 2024
1 parent db6b411 commit e1250a7
Show file tree
Hide file tree
Showing 3 changed files with 1,223 additions and 2,048 deletions.
29 changes: 28 additions & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const config: Config = {
organizationName: 'conduitio', // Usually your GitHub org/user name.
projectName: 'conduit-site', // Usually your repo name.

onBrokenLinks: 'ignore',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
onDuplicateRoutes: 'warn',

Expand Down Expand Up @@ -79,6 +79,33 @@ const config: Config = {
{ to: 'https://discord.meroxa.com', label: 'Discord Community', position: 'right' },
],
},
algolia: { // https://docusaurus.io/docs/search#using-algolia-docsearch
// The application ID provided by Algolia
appId: '37HOKUPXLR', //

// Search API key: it is safe to commit it
apiKey: '6a3c0c5d80ffbcba9eb001201f9128b8',

indexName: 'conduit',

// Facets could be configured via https://dashboard.algolia.com/apps/37HOKUPXLR/explorer/configuration/conduit/facets. It's important to note that the facets need to be enabled in the Algolia dashboard.
contextualSearch: false,
// searchParameters: {
// facetFilters: ['language:en', ''],
// },

// 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: '',

// Optional: Algolia search parameters
// searchParameters: {},

// This creates a custom page where the search is displayed. This can be useful when sharing a specific list of urls.
searchPagePath: 'docs/search', //

// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
insights: true,
},
footer: {
style: 'dark',
links: [
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@docusaurus/plugin-client-redirects": "^3.3.2",
"@docusaurus/preset-classic": "^3.3.2",
"@docusaurus/theme-mermaid": "^3.3.2",
"@docusaurus/theme-search-algolia": "^3.3.2",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mdx-js/react": "^3.0.0",
Expand Down
Loading

0 comments on commit e1250a7

Please sign in to comment.