Skip to content

Commit

Permalink
Algolia Search Bar (#53)
Browse files Browse the repository at this point in the history
This PR adds a search bar to our docs, which is powered by Algolia.
The crawler runs every week, but we can also manually refresh it
whenever we publish our docs.

We are currently using the free plan, but we can upgrade later to use
more powerful search/recommendation.

Please let me know if you want to access the Algolia dash board.

A screenshot of how it looks like:

![image](https://github.com/dbos-inc/dbos-docs/assets/11331727/112e7a7f-ad55-4659-a5a3-d9361742b5a9)
  • Loading branch information
qianl15 authored Feb 21, 2024
1 parent 09b3e15 commit 59c1c34
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,35 @@ const config = {
tableOfContents: {
maxHeadingLevel:5,
},
algolia: {
// The application ID provided by Algolia
appId: 'UY2VKOMIL2',

// Public API key: it is safe to commit it
apiKey: '283b0ed33db1f1f2a1955ba0aa83671f',

indexName: 'dbos',

// 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: 'docs\\.dbos\\.dev',

// Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
// replaceSearchResultPathname: {
// from: '/docs/', // or as RegExp: /\/docs\//
// to: '/',
// },

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

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

//... other Algolia params
},
}),
};

Expand Down

0 comments on commit 59c1c34

Please sign in to comment.