From 1af5a83e199114700151999fd91e70739ed3957c Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Fri, 6 May 2022 15:53:48 +0300 Subject: [PATCH] add segment for API reference --- www/reference/gatsby-config.js | 10 +++++++++- www/reference/package.json | 1 + www/reference/yarn.lock | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/www/reference/gatsby-config.js b/www/reference/gatsby-config.js index 570d1dcc7e..a6bea57867 100644 --- a/www/reference/gatsby-config.js +++ b/www/reference/gatsby-config.js @@ -71,7 +71,15 @@ module.exports = { options: { output: '/api/sitemap' } - } + }, + { + resolve: `gatsby-plugin-segment-js`, + options: { + prodKey: process.env.SEGMENT_API_KEY, + devKey: process.env.SEGMENT_API_KEY_DEV, + trackPage: true, + } + }, // `gatsby-plugin-preact`, // { // resolve: `gatsby-source-openapi-aggregate`, diff --git a/www/reference/package.json b/www/reference/package.json index 32aca47836..bf9e72b95e 100644 --- a/www/reference/package.json +++ b/www/reference/package.json @@ -29,6 +29,7 @@ "gatsby-plugin-preact": "^5.9.0", "gatsby-plugin-react-helmet": "^3.3.12", "gatsby-plugin-sitemap": "^5.15.0", + "gatsby-plugin-segment-js": "^3.7.1", "gatsby-plugin-theme-ui": "^0.10.1", "gatsby-remark-autolink-headers": "^4.6.0", "gatsby-source-filesystem": "^3.9.0", diff --git a/www/reference/yarn.lock b/www/reference/yarn.lock index aa55232e5b..58e938ef33 100644 --- a/www/reference/yarn.lock +++ b/www/reference/yarn.lock @@ -5452,6 +5452,11 @@ gatsby-plugin-sitemap@^5.15.0: minimatch "^3.1.2" sitemap "^7.0.0" +gatsby-plugin-segment-js@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/gatsby-plugin-segment-js/-/gatsby-plugin-segment-js-3.7.1.tgz#3432d59be0e45ee82f36a42cff060af220a0dd68" + integrity sha512-zAsjRrF77Kih7YRUJVp84thnODbzjDE44H6ePtdQfLVyPWiJj3IpS/WAwyRg9Cu3+FciFAT8WEjfJ2I02V0sUw== + gatsby-plugin-theme-ui@^0.10.1: version "0.10.1" resolved "https://registry.yarnpkg.com/gatsby-plugin-theme-ui/-/gatsby-plugin-theme-ui-0.10.1.tgz#d1ac7f4f1c4bf187694110a8670f0bb3ff470ad2"