diff --git a/packages/palette-docs/gatsby-config.js b/packages/palette-docs/gatsby-config.js index 378e33a54..956994ce5 100644 --- a/packages/palette-docs/gatsby-config.js +++ b/packages/palette-docs/gatsby-config.js @@ -77,5 +77,13 @@ module.exports = { "gatsby-plugin-styled-components", "gatsby-plugin-typescript", "gatsby-plugin-sitemap", + { + resolve: "gatsby-plugin-local-algolia-docsearch", + options: { + apiKey: "e4ea4437446d07b0549e0db7928d92d1", + indexName: "artsy_palette", + debug: false, + }, + }, ], } diff --git a/packages/palette-docs/plugins/gatsby-plugin-local-algolia-docsearch/gatsby-ssr.js b/packages/palette-docs/plugins/gatsby-plugin-local-algolia-docsearch/gatsby-ssr.js new file mode 100644 index 000000000..2c4530007 --- /dev/null +++ b/packages/palette-docs/plugins/gatsby-plugin-local-algolia-docsearch/gatsby-ssr.js @@ -0,0 +1,30 @@ +const React = require("react") + +exports.onRenderBody = ( + { setHeadComponents, setPostBodyComponents }, + { apiKey, indexName, debug = false } +) => { + setHeadComponents([ + , + ]) + + setPostBodyComponents([ +