Skip to content

Commit

Permalink
Disable Algolia in k6.io/docs (#1775)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppcano authored Oct 11, 2024
1 parent e60ab5f commit 85f9647
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require('path');

const queries = require('./src/utils/algolia');
const { isProduction } = require('./src/utils/utils.node');

require('dotenv').config({
Expand Down Expand Up @@ -157,19 +156,22 @@ const plugins = [
},
];

const enableAlgolia = false;
if (
enableAlgolia &&
process.env.ALGOLIA_ADMIN_KEY &&
process.env.GATSBY_ALGOLIA_APP_ID &&
process.env.GATSBY_ALGOLIA_SEARCH_ONLY_KEY
) {
// const queries = require('./src/utils/algolia');
plugins.push({
resolve: 'gatsby-plugin-algolia',
options: {
appId: process.env.GATSBY_ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_ADMIN_KEY,
enablePartialUpdates: true,
matchFields: ['title', 'slug', 'content', 'excerpt', 'heading'],
queries,
// queries,
chunkSize: 10000, // default: 1000
},
});
Expand Down
2 changes: 2 additions & 0 deletions src/components/shared/search-box/search-box.view.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ const Stats = connectStateResults(
);

export const SearchBox = ({ inputLabel, indices }) => {
const enableAlgolia = false;
if (
!enableAlgolia ||
!process.env.GATSBY_ALGOLIA_APP_ID ||
!process.env.GATSBY_ALGOLIA_SEARCH_ONLY_KEY
) {
Expand Down

0 comments on commit 85f9647

Please sign in to comment.