We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bbd1c8 commit 60df994Copy full SHA for 60df994
src/utils/algolia.js
@@ -1,3 +1,5 @@
1
+import config from "../../config.js";
2
+
3
const pageQuery = `{
4
pages: allMdx {
5
edges {
@@ -27,11 +29,13 @@ const flatten = arr =>
27
29
}))
28
30
const settings = { attributesToSnippet: [`excerpt:20`] }
31
32
+const indexName = config.header.search ? config.header.search.indexName : '';
33
34
const queries = [
35
{
36
query: pageQuery,
37
transformer: ({ data }) => flatten(data.pages.edges),
- indexName: `test`,
38
+ indexName: `${indexName}`,
39
settings,
40
},
41
]
0 commit comments