Add Algolia search bar

This commit is contained in:
Billy Tat
2022-09-01 17:10:49 -07:00
parent e25b8bc34f
commit 6e89a1c2f6
+23
View File
@@ -12,6 +12,29 @@ module.exports = {
projectName: 'rancher-docs', // Usually your repo name.
trailingSlash: false,
themeConfig: {
algolia: {
// The application ID provided by Algolia
appId: 'YOUR_APP_ID',
// Public API key: it is safe to commit it
apiKey: 'YOUR_SEARCH_API_KEY',
indexName: 'YOUR_INDEX_NAME',
// 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
},
colorMode: {
// "light" | "dark"
defaultMode: "light",