From 827deb9f92b783afc2f2ac8c216817af37cb7cdb Mon Sep 17 00:00:00 2001 From: Gilad Ronat Date: Sat, 24 Mar 2018 10:14:15 -0700 Subject: [PATCH 01/26] Consistently use `npm` instead of `yarn` [Docs][Review] (#4607) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove yarn from “Deploying” TODO: no sure if to remove/convert yarn example from GitLab instructions on this page, since GitLab might rely on yarn and not npm. * Use npm instead of yarn in Style Guide * Minor: guides -> Guides * npm instead of Yarn in GitHub Pages setup * GitLab yarn -> npm * Revert "Use npm instead of yarn in Style Guide" This reverts commit ac72f11e5256985f31d8087b80147cf2c4989945. For our internal stuff, we do want people to use Yarn as we commit yarn.lock files. * Blog: Hexo yarn -> npm * Package readme: yarn -> npm --- .../index.md | 4 ++-- docs/docs/deploy-gatsby.md | 11 +++++------ docs/docs/gatsby-style-guide.md | 2 +- docs/docs/how-gatsby-works-with-github-pages.md | 6 +++--- packages/gatsby-1-config-css-modules/README.md | 2 +- packages/gatsby-plugin-coffeescript/README.md | 2 +- packages/gatsby-plugin-create-client-paths/README.md | 2 +- packages/gatsby-plugin-postcss-sass/README.md | 2 +- packages/gatsby-plugin-react-css-modules/README.md | 2 +- .../gatsby-plugin-remove-trailing-slashes/README.md | 2 +- packages/gatsby-plugin-sass/README.md | 2 +- packages/gatsby-plugin-styled-components/README.md | 4 ++-- packages/gatsby-plugin-styled-jsx/README.md | 2 +- packages/gatsby-plugin-stylus/README.md | 2 +- packages/gatsby-plugin-typescript/README.md | 2 +- packages/gatsby-source-faker/README.md | 2 +- packages/gatsby-transformer-react-docgen/README.md | 2 +- 17 files changed, 25 insertions(+), 26 deletions(-) diff --git a/docs/blog/2017-10-01-migrating-my-blog-from-hexo-to-gatsby/index.md b/docs/blog/2017-10-01-migrating-my-blog-from-hexo-to-gatsby/index.md index 1796784896944..0b7a7d327fb20 100644 --- a/docs/blog/2017-10-01-migrating-my-blog-from-hexo-to-gatsby/index.md +++ b/docs/blog/2017-10-01-migrating-my-blog-from-hexo-to-gatsby/index.md @@ -181,7 +181,7 @@ Let's fix that. We need to teach Gatsby how to query the file system. Luckily this is so common it's been done for you. Install the file system source plugin: ``` -yarn add gatsby-source-filesystem +npm i --save gatsby-source-filesystem ``` Now modify `gatsby-config.js` to both use the plugin and tell it what directory @@ -230,7 +230,7 @@ files this is all you will need. But if you want to render markdown files as HTML you will need another plugin. Let's add that now: ``` -yarn add gatsby-transformer-remark +npm i --save gatsby-transformer-remark ``` As before, add it to the `plugins` field in `gatsby-config.js`: diff --git a/docs/docs/deploy-gatsby.md b/docs/docs/deploy-gatsby.md index da1dcb825dbba..b42edbcf6e6ae 100644 --- a/docs/docs/deploy-gatsby.md +++ b/docs/docs/deploy-gatsby.md @@ -56,8 +56,7 @@ now to create a new repository on GitHub. ### Use the NPM package `gh-pages` for deploying First add **gh-pages** as a `devDependency` of your site and create an npm -script to **deploy** your project by running `npm install gh-pages --save-dev` -or `yarn add gh-pages --dev` (if you have yarn installed). +script to **deploy** your project by running `npm install gh-pages --save-dev`. Then add a `deploy` script in your `package.json` file. @@ -84,7 +83,7 @@ repo, set up git in your project with `git init`. Then tell Gatsby where to deploy your site by adding the git remote address with https or ssh. Here is how to do it with https: `git remote add origin git@github.com:username/project-name.git`. -Now run `yarn deploy` or `npm run deploy`. Preview changes in your GitHub page +Now run `npm run deploy`. Preview changes in your GitHub page `https://username.github.io/project-name/`. You can also find the link to your site on GitHub under `Settings` > `GitHub Pages`. @@ -167,7 +166,7 @@ cache: pages: script: - - yarn install + - npm install - ./node_modules/.bin/gatsby build --prefix-paths artifacts: paths: @@ -182,14 +181,14 @@ in between builds, so subsequent builds should be a lot faster as it doesn't hav to reinstall all the dependancies required. `pages:` is the name of the CI stage. You can have multiple stages, e.g. 'Test', 'Build', 'Deploy' etc. `script:` starts the next part of the CI stage, telling it to start running the -below scripts inside the image selected. We have used the `yarn install` and +below scripts inside the image selected. We have used the `npm install` and `./node_modules/.bin/gatsby build --prefix-paths` which will install all dependancies, and start the static site build, respectively. We have used `./node_modules/.bin/gatsby build --prefix-paths` because we then don't have to install gatsby-cli to build the image, as it has already been included and installed -with `yarn install`. We have included `--prefix-paths` as when running the command _without_ that flag, Gatsby ignores your pathPrefix. `artifacts:` and `paths:` are used to tell GitLab pages +with `npm install`. We have included `--prefix-paths` as when running the command _without_ that flag, Gatsby ignores your pathPrefix. `artifacts:` and `paths:` are used to tell GitLab pages where the static files are kept. `only:` and `master` tells the CI to only run the above instructions when the master branch is deployed. diff --git a/docs/docs/gatsby-style-guide.md b/docs/docs/gatsby-style-guide.md index bc71db34477e4..5a58cb1947c04 100644 --- a/docs/docs/gatsby-style-guide.md +++ b/docs/docs/gatsby-style-guide.md @@ -83,7 +83,7 @@ repository. # Running the Guide locally on your own computer -Finally, if you want to run a version of the guides repository locally, follow +Finally, if you want to run a version of the Guides repository locally, follow these steps: 1. Ensure you have the yarn package manager installed `npm install -g yarn` diff --git a/docs/docs/how-gatsby-works-with-github-pages.md b/docs/docs/how-gatsby-works-with-github-pages.md index 4275dc5b278f8..f153f7466716d 100644 --- a/docs/docs/how-gatsby-works-with-github-pages.md +++ b/docs/docs/how-gatsby-works-with-github-pages.md @@ -4,7 +4,7 @@ title: How Gatsby Works with GitHub Pages The easiest way to push a gatsby app to GitHub Pages is using a package called `gh-pages`. -`yarn add --dev gh-pages` +`npm install gh-pages --save-dev` ## GitHub repository page @@ -26,7 +26,7 @@ We are using prefix paths because our website is inside a folder `http://usernam } ``` -When you run `yarn run deploy` all contents of `public` folder will be moved to your repositorys `gh-pages` branch. +When you run `npm run deploy` all contents of `public` folder will be moved to your repositorys `gh-pages` branch. ## GitHub Organization or User page @@ -43,7 +43,7 @@ In this case we dont need to specify `pathPrefix`, but our website needs to be p } ``` -After running `yarn run deploy` you should see your website at `http://username.github.io` +After running `npm run deploy` you should see your website at `http://username.github.io` ## Custom domains diff --git a/packages/gatsby-1-config-css-modules/README.md b/packages/gatsby-1-config-css-modules/README.md index d8324c7aff004..4fcfc8ffe43fe 100644 --- a/packages/gatsby-1-config-css-modules/README.md +++ b/packages/gatsby-1-config-css-modules/README.md @@ -4,7 +4,7 @@ CSS Modules configuration for Gatsby v1 plugins ## Install -`yarn add --dev gatsby-plugin-sass` +`npm install --save-dev gatsby-plugin-sass` ## How to use diff --git a/packages/gatsby-plugin-coffeescript/README.md b/packages/gatsby-plugin-coffeescript/README.md index f9f3e45df59a3..8a7b5f4624820 100644 --- a/packages/gatsby-plugin-coffeescript/README.md +++ b/packages/gatsby-plugin-coffeescript/README.md @@ -4,7 +4,7 @@ Provides drop-in support for CoffeeScript and CJSX. ## Install -`yarn add gatsby-plugin-coffeescript` +`npm install --save gatsby-plugin-coffeescript` ## How to use diff --git a/packages/gatsby-plugin-create-client-paths/README.md b/packages/gatsby-plugin-create-client-paths/README.md index 3b3d3ceea664e..7dcd633237440 100644 --- a/packages/gatsby-plugin-create-client-paths/README.md +++ b/packages/gatsby-plugin-create-client-paths/README.md @@ -7,7 +7,7 @@ Use this plugin to simplify creating a “hybrid” Gatsby app with both statica Install: ``` -yarn add gatsby-plugin-create-client-paths +npm install --save gatsby-plugin-create-client-paths ``` Then configure via `gatsby-config.js`: diff --git a/packages/gatsby-plugin-postcss-sass/README.md b/packages/gatsby-plugin-postcss-sass/README.md index 305d505e94e4a..c44a57d7a670a 100644 --- a/packages/gatsby-plugin-postcss-sass/README.md +++ b/packages/gatsby-plugin-postcss-sass/README.md @@ -5,7 +5,7 @@ support. ## Install -`yarn add gatsby-plugin-postcss-sass` +`npm install --save gatsby-plugin-postcss-sass` ## How to use diff --git a/packages/gatsby-plugin-react-css-modules/README.md b/packages/gatsby-plugin-react-css-modules/README.md index a7ac1e9338531..6d0e9ad41d144 100644 --- a/packages/gatsby-plugin-react-css-modules/README.md +++ b/packages/gatsby-plugin-react-css-modules/README.md @@ -7,7 +7,7 @@ for details. ## Install -`yarn add gatsby-plugin-react-css-modules` +`npm install --save gatsby-plugin-react-css-modules` ## How to use diff --git a/packages/gatsby-plugin-remove-trailing-slashes/README.md b/packages/gatsby-plugin-remove-trailing-slashes/README.md index f4fd087b2263a..a94e038f6ec47 100644 --- a/packages/gatsby-plugin-remove-trailing-slashes/README.md +++ b/packages/gatsby-plugin-remove-trailing-slashes/README.md @@ -8,7 +8,7 @@ example, `yoursite.com/about/` becomes `yoursite.com/about`. Install: ``` -yarn add --dev gatsby-plugin-remove-trailing-slashes +npm install --save-dev gatsby-plugin-remove-trailing-slashes ``` Then configure via `gatsby-config.js`. diff --git a/packages/gatsby-plugin-sass/README.md b/packages/gatsby-plugin-sass/README.md index 3d346bb347461..cf4d40d5b5e70 100644 --- a/packages/gatsby-plugin-sass/README.md +++ b/packages/gatsby-plugin-sass/README.md @@ -4,7 +4,7 @@ Provides drop-in support for SASS/SCSS stylesheets ## Install -`yarn add gatsby-plugin-sass` +`npm install --save gatsby-plugin-sass` ## How to use diff --git a/packages/gatsby-plugin-styled-components/README.md b/packages/gatsby-plugin-styled-components/README.md index 2c74d0c261194..bffd5090030c8 100644 --- a/packages/gatsby-plugin-styled-components/README.md +++ b/packages/gatsby-plugin-styled-components/README.md @@ -6,7 +6,7 @@ built-in server-side rendering support. ## Install -`yarn add gatsby-plugin-styled-components styled-components --save` +`npm install --save gatsby-plugin-styled-components styled-components` ## How to use @@ -25,4 +25,4 @@ module.exports = { #### v2.0.1 `styled-components` is moved to a peer dependency. Installing the package -alongside `gatsby-plugin-styled-components` is now required. Use `yarn add styled-components --save` +alongside `gatsby-plugin-styled-components` is now required. Use `npm install --save styled-components` diff --git a/packages/gatsby-plugin-styled-jsx/README.md b/packages/gatsby-plugin-styled-jsx/README.md index 9b195ccf2d644..67bb777824757 100644 --- a/packages/gatsby-plugin-styled-jsx/README.md +++ b/packages/gatsby-plugin-styled-jsx/README.md @@ -4,7 +4,7 @@ Provides drop-in support for [styled-jsx](https://github.com/zeit/styled-jsx). ## Install -`yarn add styled-jsx gatsby-plugin-styled-jsx` +`npm install --save styled-jsx gatsby-plugin-styled-jsx` ## How to use diff --git a/packages/gatsby-plugin-stylus/README.md b/packages/gatsby-plugin-stylus/README.md index d96aaca9725cd..499d6e7070c3a 100644 --- a/packages/gatsby-plugin-stylus/README.md +++ b/packages/gatsby-plugin-stylus/README.md @@ -4,7 +4,7 @@ Provides drop-in support for Stylus with or without CSS Modules ## Install -`yarn add gatsby-plugin-stylus` +`npm install --save gatsby-plugin-stylus` ## How to use diff --git a/packages/gatsby-plugin-typescript/README.md b/packages/gatsby-plugin-typescript/README.md index b3492cab0ace9..96bd1e454e452 100644 --- a/packages/gatsby-plugin-typescript/README.md +++ b/packages/gatsby-plugin-typescript/README.md @@ -4,7 +4,7 @@ Provides drop-in support for TypeScript and TSX. ## Install -`yarn add gatsby-plugin-typescript typescript` +`npm install --save gatsby-plugin-typescript typescript` ## How to use diff --git a/packages/gatsby-source-faker/README.md b/packages/gatsby-source-faker/README.md index 1562d964ce77f..0a5279d9f2d3a 100644 --- a/packages/gatsby-source-faker/README.md +++ b/packages/gatsby-source-faker/README.md @@ -7,7 +7,7 @@ This is a plugin that allows you to use [faker.js](https://github.com/marak/Fake Install `gatsby-source-faker` ``` - yarn add gatsby-source-faker + npm install --save gatsby-source-faker ``` or diff --git a/packages/gatsby-transformer-react-docgen/README.md b/packages/gatsby-transformer-react-docgen/README.md index 57533d0848be9..b3ac795b5780a 100644 --- a/packages/gatsby-transformer-react-docgen/README.md +++ b/packages/gatsby-transformer-react-docgen/README.md @@ -6,7 +6,7 @@ Parses inline component-documentation using ## Install ``` -yarn add gatsby-transformer-react-docgen +npm install --save gatsby-transformer-react-docgen ``` ## Usage From efdef9081ffc74cb96c1468075730bce0cd12474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=B6ltje?= Date: Sat, 24 Mar 2018 13:26:35 -0400 Subject: [PATCH 02/26] remark-prismjs: add aliases for languages (#4688) * remark-prismjs: refactor tests into pre and code * remark-prismjs: add aliases for languages This allows specifying aliases for languages when using prismjs. Fixes #4549 --- packages/gatsby-remark-prismjs/README.md | 5 + .../src/__tests__/__snapshots__/index.js.snap | 135 +++++++++++++++--- .../src/__tests__/index.js | 77 ++++++---- packages/gatsby-remark-prismjs/src/index.js | 12 +- 4 files changed, 179 insertions(+), 50 deletions(-) diff --git a/packages/gatsby-remark-prismjs/README.md b/packages/gatsby-remark-prismjs/README.md index b514d9c4afe17..39cd77849baf6 100644 --- a/packages/gatsby-remark-prismjs/README.md +++ b/packages/gatsby-remark-prismjs/README.md @@ -34,6 +34,11 @@ plugins: [ // A suggested value for English speakers is the non-ascii // character '›'. inlineCodeMarker: null, + // This lets you set up language aliases. For example, + // setting this to '{ sh: "bash" }' will let you use + // the language "sh" which will highlight using the + // bash highlighter. + aliases: {}, }, }, ], diff --git a/packages/gatsby-remark-prismjs/src/__tests__/__snapshots__/index.js.snap b/packages/gatsby-remark-prismjs/src/__tests__/__snapshots__/index.js.snap index 2c7e81cffdc03..23fbb7bf76515 100644 --- a/packages/gatsby-remark-prismjs/src/__tests__/__snapshots__/index.js.snap +++ b/packages/gatsby-remark-prismjs/src/__tests__/__snapshots__/index.js.snap @@ -44,6 +44,49 @@ Object { } `; +exports[`remark prism plugin generates a
 tag with aliases applied 1`] = `
+Object {
+  "children": Array [
+    Object {
+      "lang": "foobar",
+      "position": Position {
+        "end": Object {
+          "column": 4,
+          "line": 3,
+          "offset": 21,
+        },
+        "indent": Array [
+          1,
+          1,
+        ],
+        "start": Object {
+          "column": 1,
+          "line": 1,
+          "offset": 0,
+        },
+      },
+      "type": "html",
+      "value": "
+
// Fake
+
", + }, + ], + "position": Object { + "end": Object { + "column": 4, + "line": 3, + "offset": 21, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": "root", +} +`; + exports[`remark prism plugin generates a
 tag with class="language-*" prefix by default 1`] = `
 Object {
   "children": Array [
@@ -88,7 +131,7 @@ Object {
 }
 `;
 
-exports[`remark prism plugin generates inline  tag with a custom class prefix if configured 1`] = `
+exports[`remark prism plugin generates an inline  tag that handles language specifiers 1`] = `
 Object {
   "children": Array [
     Object {
@@ -96,9 +139,9 @@ Object {
         Object {
           "position": Position {
             "end": Object {
-              "column": 10,
+              "column": 29,
               "line": 1,
-              "offset": 9,
+              "offset": 28,
             },
             "indent": Array [],
             "start": Object {
@@ -108,14 +151,15 @@ Object {
             },
           },
           "type": "html",
-          "value": "foo bar",
+          "value": ".foo { color: red }
+",
         },
       ],
       "position": Position {
         "end": Object {
-          "column": 10,
+          "column": 29,
           "line": 1,
-          "offset": 9,
+          "offset": 28,
         },
         "indent": Array [],
         "start": Object {
@@ -129,9 +173,9 @@ Object {
   ],
   "position": Object {
     "end": Object {
-      "column": 10,
+      "column": 29,
       "line": 1,
-      "offset": 9,
+      "offset": 28,
     },
     "start": Object {
       "column": 1,
@@ -143,7 +187,7 @@ Object {
 }
 `;
 
-exports[`remark prism plugin generates inline  tag with class="language-*" prefix by default 1`] = `
+exports[`remark prism plugin generates an inline  tag with a custom class prefix if configured 1`] = `
 Object {
   "children": Array [
     Object {
@@ -163,7 +207,7 @@ Object {
             },
           },
           "type": "html",
-          "value": "foo bar",
+          "value": "foo bar",
         },
       ],
       "position": Position {
@@ -198,7 +242,7 @@ Object {
 }
 `;
 
-exports[`remark prism plugin inlineCode handles language specifiers 1`] = `
+exports[`remark prism plugin generates an inline  tag with aliases applied 1`] = `
 Object {
   "children": Array [
     Object {
@@ -206,9 +250,9 @@ Object {
         Object {
           "position": Position {
             "end": Object {
-              "column": 29,
+              "column": 16,
               "line": 1,
-              "offset": 28,
+              "offset": 15,
             },
             "indent": Array [],
             "start": Object {
@@ -218,15 +262,15 @@ Object {
             },
           },
           "type": "html",
-          "value": ".foo { color: red }
+          "value": "Fake
 ",
         },
       ],
       "position": Position {
         "end": Object {
-          "column": 29,
+          "column": 16,
           "line": 1,
-          "offset": 28,
+          "offset": 15,
         },
         "indent": Array [],
         "start": Object {
@@ -240,9 +284,64 @@ Object {
   ],
   "position": Object {
     "end": Object {
-      "column": 29,
+      "column": 16,
       "line": 1,
-      "offset": 28,
+      "offset": 15,
+    },
+    "start": Object {
+      "column": 1,
+      "line": 1,
+      "offset": 0,
+    },
+  },
+  "type": "root",
+}
+`;
+
+exports[`remark prism plugin generates an inline  tag with class="language-*" prefix by default 1`] = `
+Object {
+  "children": Array [
+    Object {
+      "children": Array [
+        Object {
+          "position": Position {
+            "end": Object {
+              "column": 10,
+              "line": 1,
+              "offset": 9,
+            },
+            "indent": Array [],
+            "start": Object {
+              "column": 1,
+              "line": 1,
+              "offset": 0,
+            },
+          },
+          "type": "html",
+          "value": "foo bar",
+        },
+      ],
+      "position": Position {
+        "end": Object {
+          "column": 10,
+          "line": 1,
+          "offset": 9,
+        },
+        "indent": Array [],
+        "start": Object {
+          "column": 1,
+          "line": 1,
+          "offset": 0,
+        },
+      },
+      "type": "paragraph",
+    },
+  ],
+  "position": Object {
+    "end": Object {
+      "column": 10,
+      "line": 1,
+      "offset": 9,
     },
     "start": Object {
       "column": 1,
diff --git a/packages/gatsby-remark-prismjs/src/__tests__/index.js b/packages/gatsby-remark-prismjs/src/__tests__/index.js
index c246c7aebffc9..271aed83b77e4 100644
--- a/packages/gatsby-remark-prismjs/src/__tests__/index.js
+++ b/packages/gatsby-remark-prismjs/src/__tests__/index.js
@@ -2,38 +2,59 @@ const remark = require(`remark`)
 const plugin = require(`../index`)
 
 describe(`remark prism plugin`, () => {
-  it(`generates a 
 tag with class="language-*" prefix by default`, () => {
-    const code = `\`\`\`js\n// Fake\n\`\`\``
-    const markdownAST = remark.parse(code)
-    plugin({ markdownAST })
-    expect(markdownAST).toMatchSnapshot()
-  })
+  describe(`generates a 
 tag`, () => {
+    it(`with class="language-*" prefix by default`, () => {
+      const code = `\`\`\`js\n// Fake\n\`\`\``
+      const markdownAST = remark.parse(code)
+      plugin({ markdownAST })
+      expect(markdownAST).toMatchSnapshot()
+    })
 
-  it(`generates a 
 tag with a custom class prefix if configured`, () => {
-    const code = `\`\`\`js\n// Fake\n\`\`\``
-    const markdownAST = remark.parse(code)
-    plugin({ markdownAST }, { classPrefix: `custom-` })
-    expect(markdownAST).toMatchSnapshot()
-  })
+    it(`with a custom class prefix if configured`, () => {
+      const code = `\`\`\`js\n// Fake\n\`\`\``
+      const markdownAST = remark.parse(code)
+      plugin({ markdownAST }, { classPrefix: `custom-` })
+      expect(markdownAST).toMatchSnapshot()
+    })
 
-  it(`generates inline  tag with class="language-*" prefix by default`, () => {
-    const code = `\`foo bar\``
-    const markdownAST = remark.parse(code)
-    plugin({ markdownAST })
-    expect(markdownAST).toMatchSnapshot()
+    it(`with aliases applied`, () => {
+      const code = `\`\`\`foobar\n// Fake\n\`\`\``
+      const markdownAST = remark.parse(code)
+      plugin({ markdownAST }, { aliases: { foobar: `javascript` } })
+      expect(markdownAST).toMatchSnapshot()
+    })
   })
 
-  it(`generates inline  tag with a custom class prefix if configured`, () => {
-    const code = `\`foo bar\``
-    const markdownAST = remark.parse(code)
-    plugin({ markdownAST }, { classPrefix: `custom-` })
-    expect(markdownAST).toMatchSnapshot()
-  })
+  describe(`generates an inline  tag`, () => {
+    it(`with class="language-*" prefix by default`, () => {
+      const code = `\`foo bar\``
+      const markdownAST = remark.parse(code)
+      plugin({ markdownAST })
+      expect(markdownAST).toMatchSnapshot()
+    })
+
+    it(`with a custom class prefix if configured`, () => {
+      const code = `\`foo bar\``
+      const markdownAST = remark.parse(code)
+      plugin({ markdownAST }, { classPrefix: `custom-` })
+      expect(markdownAST).toMatchSnapshot()
+    })
+
+    it(`that handles language specifiers`, () => {
+      const code = `\`css🍺  .foo { color: red }\``
+      const markdownAST = remark.parse(code)
+      plugin({ markdownAST }, { inlineCodeMarker: `🍺  ` })
+      expect(markdownAST).toMatchSnapshot()
+    })
 
-  it(`inlineCode handles language specifiers`, () => {
-    const code = `\`css🍺  .foo { color: red }\``
-    const markdownAST = remark.parse(code)
-    plugin({ markdownAST }, { inlineCodeMarker: `🍺  ` })
-    expect(markdownAST).toMatchSnapshot()
+    it(`with aliases applied`, () => {
+      const code = `\`foobar : Fake\``
+      const markdownAST = remark.parse(code)
+      plugin(
+        { markdownAST },
+        { inlineCodeMarker: ` : `, aliases: { foobar: `javascript` } }
+      )
+      expect(markdownAST).toMatchSnapshot()
+    })
   })
 })
diff --git a/packages/gatsby-remark-prismjs/src/index.js b/packages/gatsby-remark-prismjs/src/index.js
index 31181f336a797..c02aa7ad1f1d4 100644
--- a/packages/gatsby-remark-prismjs/src/index.js
+++ b/packages/gatsby-remark-prismjs/src/index.js
@@ -5,8 +5,13 @@ const highlightCode = require(`./highlight-code`)
 
 module.exports = (
   { markdownAST },
-  { classPrefix = `language-`, inlineCodeMarker = null } = {}
+  { classPrefix = `language-`, inlineCodeMarker = null, aliases = {} } = {}
 ) => {
+  const normalizeLanguage = lang => {
+    const lower = lang.toLowerCase()
+    return aliases[lower] || lower
+  }
+
   visit(markdownAST, `code`, node => {
     let language = node.lang
     let { splitLanguage, highlightLines } = parseLineNumberRange(language)
@@ -20,8 +25,7 @@ module.exports = (
     // @see https://github.com/PrismJS/prism/blob/1d5047df37aacc900f8270b1c6215028f6988eb1/themes/prism.css#L49-L54
     let languageName = `text`
     if (language) {
-      language = language.toLowerCase()
-      languageName = language
+      languageName = normalizeLanguage(language)
     }
 
     // Allow users to specify a custom class prefix to avoid breaking
@@ -49,7 +53,7 @@ module.exports = (
     if (inlineCodeMarker) {
       let [language, restOfValue] = node.value.split(`${inlineCodeMarker}`, 2)
       if (language && restOfValue) {
-        languageName = language.toLowerCase()
+        languageName = normalizeLanguage(language)
         node.value = restOfValue
       }
     }

From 9d1c1eb3892d176c8871b1c1d39f33a3d50deb81 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20H=C3=B6ltje?= 
Date: Sat, 24 Mar 2018 13:44:35 -0400
Subject: [PATCH 03/26] internally use Map() in getState()'s pages (#4681)

In an attempt to debug issue #4680 and generally improve
the performance of Gatsby as a whole, we swapped out the Array that
`getState()` uses internally with a `Map()`.
---
 packages/gatsby/src/redux/reducers/pages.js | 31 ++++++++++-----------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/packages/gatsby/src/redux/reducers/pages.js b/packages/gatsby/src/redux/reducers/pages.js
index 0aafba3cff0f9..445056b7b610f 100644
--- a/packages/gatsby/src/redux/reducers/pages.js
+++ b/packages/gatsby/src/redux/reducers/pages.js
@@ -1,6 +1,11 @@
-const _ = require(`lodash`)
 const normalize = require(`normalize-path`)
 
+const stateToMap = state => {
+  let stateMap = new Map()
+  state.forEach(payload => stateMap.set(payload.path, payload))
+  return stateMap
+}
+
 module.exports = (state = [], action) => {
   switch (action.type) {
     case `DELETE_CACHE`:
@@ -19,22 +24,16 @@ module.exports = (state = [], action) => {
       // Link page to its plugin.
       action.payload.pluginCreator___NODE = action.plugin.id
       action.payload.pluginCreatorId = action.plugin.id
-      const index = _.findIndex(state, p => p.path === action.payload.path)
-      // If the path already exists, overwrite it.
-      // Otherwise, add it to the end.
-      if (index !== -1) {
-        return [
-          ...state
-            .slice(0, index)
-            .concat(action.payload)
-            .concat(state.slice(index + 1)),
-        ]
-      } else {
-        return [...state.concat(action.payload)]
-      }
+
+      let stateMap = stateToMap(state)
+      stateMap.set(action.payload.path, action.payload)
+      return Array.from(stateMap.values())
+    }
+    case `DELETE_PAGE`: {
+      let stateMap = stateToMap(state)
+      stateMap.delete(action.payload.path)
+      return Array.from(stateMap.values())
     }
-    case `DELETE_PAGE`:
-      return state.filter(p => p.path !== action.payload.path)
     default:
       return state
   }

From 958b76de9f779f32406bcc7dffca6e2312155c43 Mon Sep 17 00:00:00 2001
From: Kyle Mathews 
Date: Sat, 24 Mar 2018 10:45:34 -0700
Subject: [PATCH 04/26] Publish

 - gatsby-1-config-css-modules@1.0.11
 - gatsby-plugin-coffeescript@1.4.13
 - gatsby-plugin-create-client-paths@1.0.8
 - gatsby-plugin-google-tagmanager@1.0.16
 - gatsby-plugin-less@1.1.8
 - gatsby-plugin-postcss-sass@1.0.19
 - gatsby-plugin-react-css-modules@1.0.15
 - gatsby-plugin-remove-trailing-slashes@1.0.9
 - gatsby-plugin-sass@1.0.24
 - gatsby-plugin-styled-components@2.0.10
 - gatsby-plugin-styled-jsx@2.0.6
 - gatsby-plugin-stylus@1.1.17
 - gatsby-plugin-typescript@1.4.19
 - gatsby-remark-embed-snippet@1.0.16
 - gatsby-remark-prismjs@1.2.21
 - gatsby-source-faker@1.0.7
 - gatsby-transformer-react-docgen@1.0.17
 - gatsby@1.9.241
---
 packages/gatsby-1-config-css-modules/package.json           | 2 +-
 packages/gatsby-plugin-coffeescript/package.json            | 2 +-
 packages/gatsby-plugin-create-client-paths/package.json     | 2 +-
 packages/gatsby-plugin-google-tagmanager/package.json       | 2 +-
 packages/gatsby-plugin-less/package.json                    | 4 ++--
 packages/gatsby-plugin-postcss-sass/package.json            | 4 ++--
 packages/gatsby-plugin-react-css-modules/package.json       | 4 ++--
 packages/gatsby-plugin-remove-trailing-slashes/package.json | 2 +-
 packages/gatsby-plugin-sass/package.json                    | 4 ++--
 packages/gatsby-plugin-styled-components/package.json       | 2 +-
 packages/gatsby-plugin-styled-jsx/package.json              | 2 +-
 packages/gatsby-plugin-stylus/package.json                  | 4 ++--
 packages/gatsby-plugin-typescript/package.json              | 2 +-
 packages/gatsby-remark-embed-snippet/package.json           | 4 ++--
 packages/gatsby-remark-prismjs/package.json                 | 2 +-
 packages/gatsby-source-faker/package.json                   | 2 +-
 packages/gatsby-transformer-react-docgen/package.json       | 2 +-
 packages/gatsby/package.json                                | 4 ++--
 18 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/packages/gatsby-1-config-css-modules/package.json b/packages/gatsby-1-config-css-modules/package.json
index 1d2fdd986cf05..4911518cb21ca 100644
--- a/packages/gatsby-1-config-css-modules/package.json
+++ b/packages/gatsby-1-config-css-modules/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-1-config-css-modules",
   "description": "CSS Modules configuration for Gatsby v1 plugins",
-  "version": "1.0.10",
+  "version": "1.0.11",
   "author": "Ming Aldrich-Gan ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
diff --git a/packages/gatsby-plugin-coffeescript/package.json b/packages/gatsby-plugin-coffeescript/package.json
index 356cc32a6f0ba..e8f35c971577a 100644
--- a/packages/gatsby-plugin-coffeescript/package.json
+++ b/packages/gatsby-plugin-coffeescript/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-plugin-coffeescript",
   "description": "Adds CoffeeScript support for Gatsby layouts and pages.",
-  "version": "1.4.12",
+  "version": "1.4.13",
   "author": "Kyle Mathews ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
diff --git a/packages/gatsby-plugin-create-client-paths/package.json b/packages/gatsby-plugin-create-client-paths/package.json
index 8ac1fc85f800c..d9a1cfe29ecfe 100644
--- a/packages/gatsby-plugin-create-client-paths/package.json
+++ b/packages/gatsby-plugin-create-client-paths/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-plugin-create-client-paths",
   "description": "Gatsby-plugin for creating paths that exist only on the client",
-  "version": "1.0.7",
+  "version": "1.0.8",
   "author": "scott.eckenthal@gmail.com",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
diff --git a/packages/gatsby-plugin-google-tagmanager/package.json b/packages/gatsby-plugin-google-tagmanager/package.json
index 8544f1e1e095b..d98dcff6d06a0 100644
--- a/packages/gatsby-plugin-google-tagmanager/package.json
+++ b/packages/gatsby-plugin-google-tagmanager/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-plugin-google-tagmanager",
   "description": "Gatsby plugin to add google tagmanager onto a site",
-  "version": "1.0.15",
+  "version": "1.0.16",
   "author": "Thijs Koerselman ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
diff --git a/packages/gatsby-plugin-less/package.json b/packages/gatsby-plugin-less/package.json
index b8d39096791c2..ee026832ff3b0 100644
--- a/packages/gatsby-plugin-less/package.json
+++ b/packages/gatsby-plugin-less/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-plugin-less",
   "description": "Adds the ability to load and parse less-files to include in project your",
-  "version": "1.1.7",
+  "version": "1.1.8",
   "author": "Ming Aldrich-Gan ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
@@ -12,7 +12,7 @@
   "dependencies": {
     "babel-runtime": "^6.26.0",
     "extract-text-webpack-plugin": "^1.0.1",
-    "gatsby-1-config-css-modules": "^1.0.10",
+    "gatsby-1-config-css-modules": "^1.0.11",
     "less": "^2.7.2",
     "less-loader": "^3.0.0",
     "webpack": "^1.13.3"
diff --git a/packages/gatsby-plugin-postcss-sass/package.json b/packages/gatsby-plugin-postcss-sass/package.json
index cb7a2a1eb6c7b..b328f2193c6df 100644
--- a/packages/gatsby-plugin-postcss-sass/package.json
+++ b/packages/gatsby-plugin-postcss-sass/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-plugin-postcss-sass",
   "description": "Gatsby plugin to handle scss/sass files with integrated support for also processing with Postcss plugins",
-  "version": "1.0.18",
+  "version": "1.0.19",
   "author": "Scotty Eckenthal ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
@@ -9,7 +9,7 @@
   "dependencies": {
     "babel-runtime": "^6.26.0",
     "extract-text-webpack-plugin": "^1.0.1",
-    "gatsby-1-config-css-modules": "^1.0.10",
+    "gatsby-1-config-css-modules": "^1.0.11",
     "node-sass": "^4.5.2",
     "sass-loader": "^4.1.1"
   },
diff --git a/packages/gatsby-plugin-react-css-modules/package.json b/packages/gatsby-plugin-react-css-modules/package.json
index 4ddeed71cd566..065fd289a5d16 100644
--- a/packages/gatsby-plugin-react-css-modules/package.json
+++ b/packages/gatsby-plugin-react-css-modules/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-plugin-react-css-modules",
   "description": "Gatsby plugin that transforms styleName to className using compile time CSS module resolution",
-  "version": "1.0.14",
+  "version": "1.0.15",
   "author": "Ming Aldrich-Gan ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
@@ -9,7 +9,7 @@
   "dependencies": {
     "babel-plugin-react-css-modules": "^3.2.1",
     "babel-runtime": "^6.26.0",
-    "gatsby-1-config-css-modules": "^1.0.10"
+    "gatsby-1-config-css-modules": "^1.0.11"
   },
   "devDependencies": {
     "babel-cli": "^6.26.0",
diff --git a/packages/gatsby-plugin-remove-trailing-slashes/package.json b/packages/gatsby-plugin-remove-trailing-slashes/package.json
index 78f66bb408914..29828506ef0f6 100644
--- a/packages/gatsby-plugin-remove-trailing-slashes/package.json
+++ b/packages/gatsby-plugin-remove-trailing-slashes/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-plugin-remove-trailing-slashes",
   "description": "This plugin removes trailing slashes from your project's paths. For example, `yoursite.com/about/` becomes `yoursite.com/about`",
-  "version": "1.0.8",
+  "version": "1.0.9",
   "author": "scott.eckenthal@gmail.com",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
diff --git a/packages/gatsby-plugin-sass/package.json b/packages/gatsby-plugin-sass/package.json
index 6eec8ba640d14..693253b37d8c9 100644
--- a/packages/gatsby-plugin-sass/package.json
+++ b/packages/gatsby-plugin-sass/package.json
@@ -1,14 +1,14 @@
 {
   "name": "gatsby-plugin-sass",
   "description": "Gatsby plugin to handle scss/sass files",
-  "version": "1.0.23",
+  "version": "1.0.24",
   "author": "Daniel Farrell ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
   },
   "dependencies": {
     "babel-runtime": "^6.26.0",
-    "gatsby-1-config-css-modules": "^1.0.10",
+    "gatsby-1-config-css-modules": "^1.0.11",
     "gatsby-1-config-extract-plugin": "^1.0.2",
     "node-sass": "^4.5.2",
     "sass-loader": "^4.1.1",
diff --git a/packages/gatsby-plugin-styled-components/package.json b/packages/gatsby-plugin-styled-components/package.json
index 9f28ac2de1db6..efe7260a8d849 100644
--- a/packages/gatsby-plugin-styled-components/package.json
+++ b/packages/gatsby-plugin-styled-components/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-plugin-styled-components",
   "description": "Gatsby plugin to add support for styled components",
-  "version": "2.0.9",
+  "version": "2.0.10",
   "author": "Guten Ye ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
diff --git a/packages/gatsby-plugin-styled-jsx/package.json b/packages/gatsby-plugin-styled-jsx/package.json
index e35f335e7353c..a2097c959e17b 100644
--- a/packages/gatsby-plugin-styled-jsx/package.json
+++ b/packages/gatsby-plugin-styled-jsx/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-plugin-styled-jsx",
   "description": "Adds SSR support for styled-jsx",
-  "version": "2.0.5",
+  "version": "2.0.6",
   "author": "Tim Suchanek ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
diff --git a/packages/gatsby-plugin-stylus/package.json b/packages/gatsby-plugin-stylus/package.json
index f00944c652116..f75ba0f19d8c8 100644
--- a/packages/gatsby-plugin-stylus/package.json
+++ b/packages/gatsby-plugin-stylus/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-plugin-stylus",
   "description": "Gatsby support for Stylus",
-  "version": "1.1.16",
+  "version": "1.1.17",
   "author": "Ian Sinnott ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
@@ -9,7 +9,7 @@
   "dependencies": {
     "babel-runtime": "^6.26.0",
     "extract-text-webpack-plugin": "^1.0.1",
-    "gatsby-1-config-css-modules": "^1.0.10",
+    "gatsby-1-config-css-modules": "^1.0.11",
     "stylus": "^0.54.5",
     "stylus-loader": "webpack1"
   },
diff --git a/packages/gatsby-plugin-typescript/package.json b/packages/gatsby-plugin-typescript/package.json
index c76d04e9d02d5..c96558ec34195 100644
--- a/packages/gatsby-plugin-typescript/package.json
+++ b/packages/gatsby-plugin-typescript/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-plugin-typescript",
   "description": "Adds TypeScript support for Gatsby layouts and pages.",
-  "version": "1.4.18",
+  "version": "1.4.19",
   "author": "Kyle Mathews ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
diff --git a/packages/gatsby-remark-embed-snippet/package.json b/packages/gatsby-remark-embed-snippet/package.json
index 06a7b8848bb26..5de6c7ed87e83 100644
--- a/packages/gatsby-remark-embed-snippet/package.json
+++ b/packages/gatsby-remark-embed-snippet/package.json
@@ -1,14 +1,14 @@
 {
   "name": "gatsby-remark-embed-snippet",
   "description": "Gatsby plugin to embed formatted code snippets within markdown",
-  "version": "1.0.15",
+  "version": "1.0.16",
   "author": "Brian Vaughn ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
   },
   "dependencies": {
     "babel-runtime": "^6.26.0",
-    "gatsby-remark-prismjs": "^1.2.20",
+    "gatsby-remark-prismjs": "^1.2.21",
     "normalize-path": "^2.1.1",
     "parse-numeric-range": "^0.0.2",
     "unist-util-map": "^1.0.3"
diff --git a/packages/gatsby-remark-prismjs/package.json b/packages/gatsby-remark-prismjs/package.json
index 7ac197670d119..05b9f29f9f1dd 100644
--- a/packages/gatsby-remark-prismjs/package.json
+++ b/packages/gatsby-remark-prismjs/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-remark-prismjs",
   "description": "Adds syntax highlighting to code blocks at build time using PrismJS",
-  "version": "1.2.20",
+  "version": "1.2.21",
   "author": "Kyle Mathews ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
diff --git a/packages/gatsby-source-faker/package.json b/packages/gatsby-source-faker/package.json
index 04d2d7570b94f..6e45221ae5801 100644
--- a/packages/gatsby-source-faker/package.json
+++ b/packages/gatsby-source-faker/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-source-faker",
   "description": "A gatsby plugin to get fake data for testing",
-  "version": "1.0.6",
+  "version": "1.0.7",
   "author": "Pavithra Kodmad",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
diff --git a/packages/gatsby-transformer-react-docgen/package.json b/packages/gatsby-transformer-react-docgen/package.json
index ee6e74369f90b..58983e720d156 100644
--- a/packages/gatsby-transformer-react-docgen/package.json
+++ b/packages/gatsby-transformer-react-docgen/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby-transformer-react-docgen",
   "description": "Expose React component metadata and prop information as GraphQL types",
-  "version": "1.0.16",
+  "version": "1.0.17",
   "author": "Jason Quense ",
   "bugs": {
     "url": "https://github.com/gatsbyjs/gatsby/issues"
diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json
index 3548164a54ee2..382069aaac85e 100644
--- a/packages/gatsby/package.json
+++ b/packages/gatsby/package.json
@@ -1,7 +1,7 @@
 {
   "name": "gatsby",
   "description": "React.js Static Site Generator",
-  "version": "1.9.240",
+  "version": "1.9.241",
   "author": "Kyle Mathews ",
   "bin": {
     "gatsby": "./dist/bin/gatsby.js"
@@ -48,7 +48,7 @@
     "friendly-errors-webpack-plugin": "^1.6.1",
     "front-matter": "^2.1.0",
     "fs-extra": "^4.0.1",
-    "gatsby-1-config-css-modules": "^1.0.10",
+    "gatsby-1-config-css-modules": "^1.0.11",
     "gatsby-1-config-extract-plugin": "^1.0.2",
     "gatsby-cli": "^1.1.48",
     "gatsby-link": "^1.6.39",

From 47c0e2f7ddd87bca850ef0c90b6de3496fac8fba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Josu=C3=A9?= 
Date: Sat, 24 Mar 2018 17:15:24 -0600
Subject: [PATCH 05/26] Add direct link to download VS Community 2015

---
 docs/docs/gatsby-on-windows.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/docs/gatsby-on-windows.md b/docs/docs/gatsby-on-windows.md
index bc92b53c4c453..f94109a425dad 100644
--- a/docs/docs/gatsby-on-windows.md
+++ b/docs/docs/gatsby-on-windows.md
@@ -30,7 +30,7 @@ This might be your problem if, after running `npm install` on a Gatsby site, you
 see compilation errors such as `node-gyp` or `sharp` or `binding.gyp not found`.
 
 If you suspect this is your problem, download the
-[Visual Studio Community 2015 Package](https://www.visualstudio.com/products/visual-studio-community-vs)
+[Visual Studio Community 2015 Package](https://go.microsoft.com/fwlink/?LinkId=532606&clcid=0x409)
 and install only the part of the package that interests us : `Programming languages > Visual C++ > Common tools for Visual Studio 2015`. Be sure to
 download the 2015 version of VS Community, not the 2017 version (see Note 1
 below) ; you'll have to use the

From 6267bb868f93c36c337f3b98df1251f69836f4f6 Mon Sep 17 00:00:00 2001
From: Hunter Chang 
Date: Sun, 25 Mar 2018 10:10:38 -0600
Subject: [PATCH 06/26] Add CodeBushi to showcase

replacing hunterchang.com with CodeBushi
---
 README.md | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/README.md b/README.md
index d95ce29b50eae..17309e8340809 100644
--- a/README.md
+++ b/README.md
@@ -110,8 +110,6 @@ Websites built with Gatsby:
 * [greglobinski.com](https://greglobinski.com)
   ([source](https://github.com/greglobinski/greglobinski-com))
 * [Vibert Thio's Portfolio](https://vibertthio.com/portfolio/)([source](https://github.com/vibertthio/portfolio))
-* [hunterchang.com](https://hunterchang.com)
-  ([source](https://github.com/ChangoMan/hc-gatsby))
 * [YouFoundRon.com](https://youfoundron.com)
   ([source](https://github.com/rongierlach/yfr-dot-com))
 * [heml.io](https://heml.io)
@@ -187,6 +185,7 @@ Websites built with Gatsby:
 * [The Rick and Morty API](http://rickandmortyapi.com/)
 * [Adnan Fajlur - Portfolio](https://adnanfajlur.xyz/)
 * [Hapticmedia](https://hapticmedia.fr/en/)
+* [CodeBushi](https://codebushi.com/)
 
 ## Docs
 

From 6bb2b0f9d66c059252b46eeee6e0c847be2f481a Mon Sep 17 00:00:00 2001
From: Taylor Bryant 
Date: Sun, 25 Mar 2018 14:24:31 -0500
Subject: [PATCH 07/26] Add Gatsby Starter Tailwind

---
 docs/docs/gatsby-starters.md | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/docs/docs/gatsby-starters.md b/docs/docs/gatsby-starters.md
index f54a2d3e9224f..dff97805d1592 100644
--- a/docs/docs/gatsby-starters.md
+++ b/docs/docs/gatsby-starters.md
@@ -540,3 +540,13 @@ Community:
   * Sticky Navigation when scrolling.
   * Scroll spy and smooth scrolling to different sections of the page.
   * Styling with SCSS
+  
+* [gatsby-starter-tailwind](https://github.com/taylorbryant/gatsby-starter-tailwind)
+  [(demo)](https://quizzical-mcclintock-0226ac.netlify.com/)
+
+  Features:
+
+  * Based on [gatsby-starter-default](https://github.com/gatsbyjs/gatsby-starter-default)
+  * [Tailwind CSS](https://tailwindcss.com) Framework
+  * Removes unused CSS with [Purgecss](https://www.purgecss.com/)
+  * Includes responsive navigation and form examples

From 48a58976f737970d01c7e7062a37420f0d323c7d Mon Sep 17 00:00:00 2001
From: Philipp Czernitzki 
Date: Mon, 26 Mar 2018 14:02:35 +0200
Subject: [PATCH 08/26] Add philippczernitzki.me to Showcase (#4710)

---
 README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index d95ce29b50eae..faaa7e6ca4f20 100644
--- a/README.md
+++ b/README.md
@@ -187,6 +187,7 @@ Websites built with Gatsby:
 * [The Rick and Morty API](http://rickandmortyapi.com/)
 * [Adnan Fajlur - Portfolio](https://adnanfajlur.xyz/)
 * [Hapticmedia](https://hapticmedia.fr/en/)
+* [Philipp Czernitzki - Blog/Website](http://philippczernitzki.me)
 
 ## Docs
 

From 30dbaa8f50bd31a851add82ce1e588c4a6a92433 Mon Sep 17 00:00:00 2001
From: Mike Allanson 
Date: Mon, 26 Mar 2018 15:06:26 +0100
Subject: [PATCH 09/26] Also point to download page and update description

---
 docs/docs/gatsby-on-windows.md | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/docs/docs/gatsby-on-windows.md b/docs/docs/gatsby-on-windows.md
index f94109a425dad..5aa8d3fa5358b 100644
--- a/docs/docs/gatsby-on-windows.md
+++ b/docs/docs/gatsby-on-windows.md
@@ -30,12 +30,10 @@ This might be your problem if, after running `npm install` on a Gatsby site, you
 see compilation errors such as `node-gyp` or `sharp` or `binding.gyp not found`.
 
 If you suspect this is your problem, download the
-[Visual Studio Community 2015 Package](https://go.microsoft.com/fwlink/?LinkId=532606&clcid=0x409)
+[Visual Studio Community 2015 Package](https://www.visualstudio.com/vs/older-downloads/) (also available from this [direct download link](https://go.microsoft.com/fwlink/?LinkId=532606&clcid=0x409))
 and install only the part of the package that interests us : `Programming languages > Visual C++ > Common tools for Visual Studio 2015`. Be sure to
 download the 2015 version of VS Community, not the 2017 version (see Note 1
-below) ; you'll have to use the
-[search bar on the VS site](https://www.visualstudio.com/products/visual-studio-community-vs)
-to find it. You can uncheck everything else. You don't need to install the full
+below). You can uncheck everything else. You don't need to install the full
 VS2015 Express on your system and this won't mess up your existing VS201x
 installs.
 

From 924e74273bd3b3fff4cac5d4cf0a403eadd4f417 Mon Sep 17 00:00:00 2001
From: Sriram Thiagarajan 
Date: Mon, 26 Mar 2018 21:59:10 +0530
Subject: [PATCH 10/26] [www] Fix logic to determine selected plugin from list
 (#4706)

* fix logic to determine selected plugin from list

* fix selected style for scoped packages
---
 www/src/components/searchbar-body.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/www/src/components/searchbar-body.js b/www/src/components/searchbar-body.js
index 9c5851223ad51..51fd89e421d3e 100644
--- a/www/src/components/searchbar-body.js
+++ b/www/src/components/searchbar-body.js
@@ -306,7 +306,10 @@ class Search extends Component {
 
 // the result component is fed into the InfiniteHits component
 const Result = ({ hit, pathname, search }) => {
-  const selected = pathname.slice(10) === hit.name
+  // Example:
+  // pathname = `/plugins/gatsby-link/` || `/plugins/@comsoc/gatsby-mdast-copy-linked-files`
+  //  hit.name = `gatsby-link` || `@comsoc/gatsby-mdast-copy-linked-files`
+  const selected = pathname.includes(hit.name)
   return (
     
Date: Tue, 27 Mar 2018 02:59:01 +0900
Subject: [PATCH 11/26] Fix #4503 (#4698)

* Fix #4503

- added check to make sure node exists before tying to get descendents and delete
- added test case that calls deleteNode on an undefined node

* formatting

* formatting
---
 .../index.md                                  |   9 +-
 docs/docs/gatsby-config.md                    | 109 +++++++++---------
 docs/docs/gatsby-starters.md                  |   8 +-
 docs/docs/graphql-reference.md                |   3 +-
 docs/docs/local-https.md                      |   4 +-
 docs/docs/plugins.md                          |   2 +-
 docs/tutorial/index.md                        |   4 +-
 docs/tutorial/part-five/index.md              |   2 +-
 docs/tutorial/part-four/index.md              |   1 -
 docs/tutorial/part-seven/index.md             |   4 +-
 docs/tutorial/part-six/index.md               |   4 +-
 docs/tutorial/part-two/index.md               |   2 +-
 examples/using-sass/src/layouts/index.js      |   5 +-
 examples/using-styled-components/src/html.js  |   5 +-
 examples/using-styletron/src/html.js          |   5 +-
 .../gatsby-1-config-extract-plugin/README.md  |   6 +-
 packages/gatsby-cli/src/reporter/errors.js    |   4 +-
 packages/gatsby-plugin-fullstory/README.md    |   7 +-
 .../gatsby-plugin-google-analytics/README.md  |   5 +-
 .../src/gatsby-browser.js                     |   6 +-
 .../gatsby-plugin-google-tagmanager/README.md |   3 +-
 .../src/__tests__/gatsby-node.js              |  16 ++-
 .../gatsby-remark-embed-snippet/README.md     |  10 +-
 packages/gatsby-remark-images/README.md       |   2 +-
 packages/gatsby-remark-images/src/index.js    |   2 +-
 packages/gatsby-transformer-remark/README.md  |   2 +-
 .../src/bootstrap/resolve-module-exports.js   |   5 +-
 packages/gatsby/src/commands/develop.js       |   6 +-
 packages/gatsby/src/redux/__tests__/nodes.js  |   5 +
 packages/gatsby/src/redux/actions.js          |  20 ++--
 packages/gatsby/src/redux/index.js            |  50 ++++----
 packages/gatsby/src/utils/cache.js            |  22 ++--
 www/src/components/search-form.js             |   2 +-
 yarn.lock                                     |  95 ++++++++++++++-
 34 files changed, 270 insertions(+), 165 deletions(-)

diff --git a/docs/blog/2018-03-07-why-we-created-the-plugin-library/index.md b/docs/blog/2018-03-07-why-we-created-the-plugin-library/index.md
index af164db5f9614..6636e0c0e3ae3 100644
--- a/docs/blog/2018-03-07-why-we-created-the-plugin-library/index.md
+++ b/docs/blog/2018-03-07-why-we-created-the-plugin-library/index.md
@@ -43,7 +43,6 @@ Next, we analyzed over 10 admirable and/or popular plugin libraries to draw from
 * [Apple App store](https://www.apple.com/ios/app-store/)
 * [Google Play store](https://play.google.com/store/apps/top)
 
-
 ### The goods 👍
 
 We liked when these libraries let users:
@@ -55,14 +54,13 @@ We liked when these libraries let users:
 
 ### The bads 👎
 
-We *didn't* like these things in some of the above libraries:
+We _didn't_ like these things in some of the above libraries:
 
 * poor contrast and poor information heirarchy
 * limited filters
 * too many filters
 * low information density
 
-
 ## Prototypes and their evolutions
 
 Here’s a sampling of screenshots that many community members contributed to and gave feedback about. It’s rewarding to see how much the design has progressed (and will keep progressing).
@@ -74,17 +72,16 @@ Here’s a sampling of screenshots that many community members contributed to an
 
 ## Next steps for the plugin library
 
-The plugin ecosystem is a huge part of what makes Gatsby awesome because plugins and packages make Gatsby extensible. There's a virtuous cycle where people find plugins, use them, contribute to them, and create new ones. We hope to accelerate this cycle, so the Gatsby ecosystem can develop faster and more people can build awesome sites! 
+The plugin ecosystem is a huge part of what makes Gatsby awesome because plugins and packages make Gatsby extensible. There's a virtuous cycle where people find plugins, use them, contribute to them, and create new ones. We hope to accelerate this cycle, so the Gatsby ecosystem can develop faster and more people can build awesome sites!
 
 Here are some ways you can help make the Gatsby plugin ecoystem great:
 
 * Share feedback on the plugin library on [Github Issue #4394](https://github.com/gatsbyjs/gatsby/issues/4394).
 * If you created a plugin and it's not showing up in the library, double check that the package has "gatsby-plugin" in its keywords.
 * Create plugins (or publish ones you've already built)! If you're interested, the [Plugin Authoring](/docs/plugin-authoring/) page can help.
-* [Contact me](https://twitter.com/shannonb_ux/status/938551014956732418) here if you have feedback that differs from or provides deeper insight into one of the pain points this article mentions. 
+* [Contact me](https://twitter.com/shannonb_ux/status/938551014956732418) here if you have feedback that differs from or provides deeper insight into one of the pain points this article mentions.
 * Follow us on [Twitter](https://twitter.com/gatsbyjs).
 
-
 ## Sneak peak into the next UX project
 
 Our next UX project is designing and building a [Gatsby site showcase](https://github.com/gatsbyjs/gatsby/issues/4394). Please contribute to and subscribe to the issue to help out!
diff --git a/docs/docs/gatsby-config.md b/docs/docs/gatsby-config.md
index 7a636516249e6..a7eb57781bf3f 100644
--- a/docs/docs/gatsby-config.md
+++ b/docs/docs/gatsby-config.md
@@ -10,12 +10,12 @@ _Note: There are many sample configs which may be helpful to reference in the di
 
 Options available to set within `gatsby-config.js` include:
 
-1. siteMetadata (object)
-2. plugins (array)
-3. pathPrefix (string)
-4. polyfill (boolean)
-5. mapping (object)
-6. proxy (object)
+1.  siteMetadata (object)
+2.  plugins (array)
+3.  pathPrefix (string)
+4.  polyfill (boolean)
+5.  mapping (object)
+6.  proxy (object)
 
 ## siteMetadata
 
@@ -142,47 +142,44 @@ query BlogPost($slug: String!) {
 Mapping can also be used to map an array of ids to any other collection of data. For example, if you have two JSON files
 `experience.json` and `tech.json` as follows:
 
-```javascript
+```json
 // experience.json
 [
-    {
-        "id": "companyA",
-        "company": "Company A",
-        "position": "Unicorn Developer",
-        "from": "Dec 2016",
-        "to": "Present",
-        "items": [
-            {
-                "label": "Responsibility",
-                "description": "Being an unicorn"
-            },
-            {
-                "label": "Hands on",
-                "tech": [
-                    "REACT",
-                    "NODE"
-                ]
-            }
-        ]
-    },
+  {
+    "id": "companyA",
+    "company": "Company A",
+    "position": "Unicorn Developer",
+    "from": "Dec 2016",
+    "to": "Present",
+    "items": [
+      {
+        "label": "Responsibility",
+        "description": "Being an unicorn"
+      },
+      {
+        "label": "Hands on",
+        "tech": ["REACT", "NODE"]
+      }
+    ]
+  }
 ]
 ```
 
-```javascript
+```json
 // tech.json
 [
-    {
-        "id": "REACT",
-        "icon": "facebook",
-        "color": "teal",
-        "label": "React"
-    },
-    {
-        "id": "NODE",
-        "icon": "server",
-        "color": "green",
-        "label": "NodeJS"
-    }
+  {
+    "id": "REACT",
+    "icon": "facebook",
+    "color": "teal",
+    "label": "React"
+  },
+  {
+    "id": "NODE",
+    "icon": "server",
+    "color": "green",
+    "label": "NodeJS"
+  }
 ]
 ```
 
@@ -202,24 +199,24 @@ You can query the `tech` object via the referred ids in `experience`:
 ```graphql
 query CV {
   experience: allExperienceJson {
-      edges {
-          node {
-              company
-              position
-              from
-              to
-              items {
-                  label
-                  description
-                  link
-                  tech {
-                      label
-                      color
-                      icon
-                  }
-              }
+    edges {
+      node {
+        company
+        position
+        from
+        to
+        items {
+          label
+          description
+          link
+          tech {
+            label
+            color
+            icon
           }
+        }
       }
+    }
   }
 }
 ```
diff --git a/docs/docs/gatsby-starters.md b/docs/docs/gatsby-starters.md
index dff97805d1592..d93245e368ede 100644
--- a/docs/docs/gatsby-starters.md
+++ b/docs/docs/gatsby-starters.md
@@ -299,15 +299,15 @@ Community:
   [(demo)](https://gatsby-starter-personal-blog.greglobinski.com/)
 
   Features:
-  
+
   * Ready to use, but easily customizable a fully equipped theme starter
   * Easy editable content in Markdown files (posts, pages and parts)
-  * 'Like an app' layout transitions 
+  * 'Like an app' layout transitions
   * Easily restyled through theme object
   * Styling with JSS
   * Page transitions
   * Comments (Facebook)
-  * Post categories 
+  * Post categories
   * Post list filtering
   * Full text searching (Algolia)
   * Contact form (Netlify form handling)
@@ -528,7 +528,7 @@ Community:
   * Responsive Design, optimized for Mobile devices
   * Seo Friendly
   * Uses Flexbox
-  
+
 * [gatsby-starter-stellar](https://github.com/codebushi/gatsby-starter-stellar)
   [(demo)](http://gatsby-stellar.surge.sh/)
 
diff --git a/docs/docs/graphql-reference.md b/docs/docs/graphql-reference.md
index 212e5e1e9c475..dd5fc6107b8fb 100644
--- a/docs/docs/graphql-reference.md
+++ b/docs/docs/graphql-reference.md
@@ -66,11 +66,10 @@ This query combines sorting, filtering, limiting and formatting together.
 
 
 
-
 ## Query variables
 
 Work in progress - pull requests welcome.
 
 ## Where next?
 
-Try [running your own queries](https://gatsbygraphql.sloppy.zone/?query=%23%20Welcome%20to%20GraphiQL%0A%23%0A%23%20GraphiQL%20is%20an%20in-browser%20tool%20for%20writing%2C%20validating%2C%20and%0A%23%20testing%20GraphQL%20queries.%0A%23%0A%23%20Type%20queries%20into%20this%20side%20of%20the%20screen%2C%20and%20you%20will%20see%20intelligent%0A%23%20typeaheads%20aware%20of%20the%20current%20GraphQL%20type%20schema%20and%20live%20syntax%20and%0A%23%20validation%20errors%20highlighted%20within%20the%20text.%0A%23%0A%23%20GraphQL%20queries%20typically%20start%20with%20a%20%22%7B%22%20character.%20Lines%20that%20starts%0A%23%20with%20a%20%23%20are%20ignored.%0A%23%0A%23%20All%20the%20data%20behind%20gatsbyjs.org%20can%20be%20queried%20from%20here.%20Below%20is%20%0A%23%20an%20example%20query%20to%20get%20you%20started.%0A%23%0A%23%20Keyboard%20shortcuts%3A%0A%23%0A%23%20%20Prettify%20Query%3A%20%20Shift-Ctrl-P%20(or%20press%20the%20prettify%20button%20above)%0A%23%0A%23%20%20%20%20%20%20%20Run%20Query%3A%20%20Ctrl-Enter%20(or%20press%20the%20play%20button%20above)%0A%23%0A%23%20%20%20Auto%20Complete%3A%20%20Ctrl-Space%20(or%20just%20start%20typing)%0A%23%0A%0A%7B%0A%20%20allSitePage(%0A%20%20%20%20limit%3A%205%0A%20%20)%20%7B%0A%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20path%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D), check out the rest of [the docs](/docs/) or run through [the tutorial](/tutorial/).
+Try [running your own queries](), check out the rest of [the docs](/docs/) or run through [the tutorial](/tutorial/).
diff --git a/docs/docs/local-https.md b/docs/docs/local-https.md
index 9d04a78000afe..ff47638a9b1a1 100644
--- a/docs/docs/local-https.md
+++ b/docs/docs/local-https.md
@@ -18,7 +18,7 @@ When setting up a development SSL certificate for the first time, you may be ask
 
     Password:
 
-This is *only* required the first time you are using Gatsby's HTTPS feature on your machine. After that, certificates will be created on the fly.
+This is _only_ required the first time you are using Gatsby's HTTPS feature on your machine. After that, certificates will be created on the fly.
 
 After typing in your password, `devcert` will attempt to install some software necessary to tell Firefox (and Chrome, only on Linux) to trust your development certificates.
 
@@ -33,6 +33,6 @@ Now open the development server at [https://localhost:8000](https://localhost:80
 
 Find out more about [how devcert works](https://github.com/davewasmer/devcert#how-it-works).
 
-****
+---
 
 Keep in mind that the certificates are explicitly issued to `localhost` and will only be accepted there. Using it together with the `--host` option will likely result in browser warnings.
diff --git a/docs/docs/plugins.md b/docs/docs/plugins.md
index 54fb12fa3a24c..2c0f6452c71f9 100644
--- a/docs/docs/plugins.md
+++ b/docs/docs/plugins.md
@@ -9,7 +9,7 @@ support, process images, etc.
 For larger / complex sites, they let you modularize your site customizations
 into site-specific plugins.
 
-Gatsby has a large and growing set of plugins. To search/browse official and 
+Gatsby has a large and growing set of plugins. To search/browse official and
 community plugins and their documentation, visit the [Plugin Library](/packages/).
 
 For information on building your own plugin, see the Plugin Authoring page (/plugin-authoring.md).
diff --git a/docs/tutorial/index.md b/docs/tutorial/index.md
index 43d4040099ab3..42089b74c31a8 100644
--- a/docs/tutorial/index.md
+++ b/docs/tutorial/index.md
@@ -15,9 +15,9 @@ This tutorial is for _everyone_! You do not need to be a programmer or React.js
 
 ## Advanced tutorials
 
-In these advanced tutorials, you'll learn how to pull data from almost anywhere into your Gatsby site with GraphQL. 
+In these advanced tutorials, you'll learn how to pull data from almost anywhere into your Gatsby site with GraphQL.
 
-4. [Querying for data in a blog](/tutorial/part-four/): Create a blog and use a GraphQL query to pull your site title into the blog header. 
+4. [Querying for data in a blog](/tutorial/part-four/): Create a blog and use a GraphQL query to pull your site title into the blog header.
 5. [Source plugins and rendering queried data](/tutorial/part-five/): Use a source plugin to pull Markdown blogposts into your site and create an index page with a list of blogposts.
 6. [Transformer plugins](/tutorial/part-six/): Use a transformer plugin to transform your Markdown blogposts into a form the blog can render.
 7. [Programmatically create pages from data](/tutorial/part-seven/): Learn how to programmatically create a set of pages for your blogposts.
diff --git a/docs/tutorial/part-five/index.md b/docs/tutorial/part-five/index.md
index 0ed545bb47eda..dd32a84c32bc1 100644
--- a/docs/tutorial/part-five/index.md
+++ b/docs/tutorial/part-five/index.md
@@ -205,4 +205,4 @@ And… 😲
 
 ## What's coming next?
 
-Now you've learned how source plugins bring data _into_ Gatsby’s data system. In the next tutorial, you'll learn how transformer plugins _transform_ the raw content brought by source plugins. The combination of source plugins and transformer plugins can handle all data sourcing and data transformation you might need when building a Gatsby site. Click here for the [next tutorial to learn about transformer plugins](/tutorial/part-six/).
\ No newline at end of file
+Now you've learned how source plugins bring data _into_ Gatsby’s data system. In the next tutorial, you'll learn how transformer plugins _transform_ the raw content brought by source plugins. The combination of source plugins and transformer plugins can handle all data sourcing and data transformation you might need when building a Gatsby site. Click here for the [next tutorial to learn about transformer plugins](/tutorial/part-six/).
diff --git a/docs/tutorial/part-four/index.md b/docs/tutorial/part-four/index.md
index 27ba86e6ee53f..c87e8f8526416 100644
--- a/docs/tutorial/part-four/index.md
+++ b/docs/tutorial/part-four/index.md
@@ -347,4 +347,3 @@ in our source.
 ## What's coming next?
 
 Next, you'll be learning about how to pull data into your Gatsby site using GraphQL with source plugins in [part five](/tutorial/part-five/) of the tutorial.
-
diff --git a/docs/tutorial/part-seven/index.md b/docs/tutorial/part-seven/index.md
index ce65fd66f81d9..0fb017b8e2462 100644
--- a/docs/tutorial/part-seven/index.md
+++ b/docs/tutorial/part-seven/index.md
@@ -388,7 +388,5 @@ Now that you've built a Gatsby site, where do you go next?
 * Share your Gatsby site on Twitter and see what other people have created by searching for #gatsbytutorial! Make sure to mention @gatsbyjs in your Tweet, and include the hashtag #gatsbytutorial :)
 * You could take a look at some [example sites](https://github.com/gatsbyjs/gatsby/tree/master/examples#gatsby-example-websites)
 * Explore more [plugins](/docs/plugins/)
-* See what [other people are building with Gatsby] (https://github.com/gatsbyjs/gatsby/#showcase)
+* See what [other people are building with Gatsby](https://github.com/gatsbyjs/gatsby/#showcase)
 * Check out the documentation on [Gatsby's APIs](/docs/api-specification/), [nodes](/docs/node-interface/) or [GraphQL](/docs/graphql-reference/)
-
-
diff --git a/docs/tutorial/part-six/index.md b/docs/tutorial/part-six/index.md
index d2270439a3fb9..b832a7461d45e 100644
--- a/docs/tutorial/part-six/index.md
+++ b/docs/tutorial/part-six/index.md
@@ -5,7 +5,7 @@ typora-copy-images-to: ./
 
 ## What's in this tutorial?
 
-The previous tutorial showed how source plugins bring data _into_ Gatsby’s data system. In this tutorial,you'll learn how transformer plugins _transform_ the raw content brought by source plugins. The combination of source plugins and transformer plugins can handle all data sourcing and data transformation you might need when building a Gatsby site. 
+The previous tutorial showed how source plugins bring data _into_ Gatsby’s data system. In this tutorial,you'll learn how transformer plugins _transform_ the raw content brought by source plugins. The combination of source plugins and transformer plugins can handle all data sourcing and data transformation you might need when building a Gatsby site.
 
 ## Transformer plugins
 
@@ -198,4 +198,4 @@ next learn how to _programmatically_ create pages from _data_. Gatsby is _not_
 limited to making pages from files like many static site generators. Gatsby lets
 you use GraphQL to query your _data_ and _map_ the data to _pages_—all at build
 time. This is a really powerful idea. We'll be exploring its implications and
-ways to use it in the next tutorial, where you'll learn how to [programmatically create pages from data](/tutorial/part-seven/).
\ No newline at end of file
+ways to use it in the next tutorial, where you'll learn how to [programmatically create pages from data](/tutorial/part-seven/).
diff --git a/docs/tutorial/part-two/index.md b/docs/tutorial/part-two/index.md
index 419e06e0cc1af..9329d768e79fa 100644
--- a/docs/tutorial/part-two/index.md
+++ b/docs/tutorial/part-two/index.md
@@ -308,7 +308,7 @@ export default typography;
 
 ![typography-lawton](typography-lawton.png)
 
-*Challenge:* Typography.js has more than 30 themes!
+_Challenge:_ Typography.js has more than 30 themes!
 [Try them live](http://kyleamathews.github.io/typography.js) or check out
 [the complete list](https://github.com/KyleAMathews/typography.js#published-typographyjs-themes) and try installing one on your current Gatsby site.
 
diff --git a/examples/using-sass/src/layouts/index.js b/examples/using-sass/src/layouts/index.js
index 2bd52770fc54d..ff599e801c8df 100644
--- a/examples/using-sass/src/layouts/index.js
+++ b/examples/using-sass/src/layouts/index.js
@@ -3,10 +3,7 @@ import PropTypes from "prop-types"
 
 import "../styles/main.scss"
 
-const Layout = ({ children }) =>
-  
- {children()} -
+const Layout = ({ children }) =>
{children()}
Layout.propTypes = { children: PropTypes.any, diff --git a/examples/using-styled-components/src/html.js b/examples/using-styled-components/src/html.js index 996c95a3d883d..5affc9b4f6904 100644 --- a/examples/using-styled-components/src/html.js +++ b/examples/using-styled-components/src/html.js @@ -37,7 +37,10 @@ class Html extends Component { - + - + { - switch(stage) { + switch (stage) { case `build-css`: { - loader: extractTextPlugin(stage).extract(`style`, `css`) + loader: extractTextPlugin(stage).extract(`style`, `css`); } } }; diff --git a/packages/gatsby-cli/src/reporter/errors.js b/packages/gatsby-cli/src/reporter/errors.js index 08fd74680b961..1dac2dcade1be 100644 --- a/packages/gatsby-cli/src/reporter/errors.js +++ b/packages/gatsby-cli/src/reporter/errors.js @@ -25,10 +25,10 @@ function getErrorFormatter() { "pretty-error": { marginTop: 1, }, - 'pretty-error > header': { + "pretty-error > header": { background: `red`, }, - 'pretty-error > header > colon': { + "pretty-error > header > colon": { color: `white`, }, }) diff --git a/packages/gatsby-plugin-fullstory/README.md b/packages/gatsby-plugin-fullstory/README.md index 1dc45a964c379..21836cbd7d134 100644 --- a/packages/gatsby-plugin-fullstory/README.md +++ b/packages/gatsby-plugin-fullstory/README.md @@ -15,10 +15,9 @@ module.exports = { { resolve: `gatsby-plugin-fullstory`, options: { - fs_org: YOUR_ORG_ID + fs_org: YOUR_ORG_ID, }, }, - ] -} + ], +}; ``` - diff --git a/packages/gatsby-plugin-google-analytics/README.md b/packages/gatsby-plugin-google-analytics/README.md index 2f9fe2597423d..b06ee26ea1c55 100644 --- a/packages/gatsby-plugin-google-analytics/README.md +++ b/packages/gatsby-plugin-google-analytics/README.md @@ -1,4 +1,5 @@ # gatsby-plugin-google-analytics + Easily add Google Analytics to your Gatsby site. ## Install @@ -23,8 +24,8 @@ module.exports = { respectDNT: true, }, }, - ] -} + ], +}; ``` ## The "anonymize" option diff --git a/packages/gatsby-plugin-google-analytics/src/gatsby-browser.js b/packages/gatsby-plugin-google-analytics/src/gatsby-browser.js index 67baeb2cafbf3..9fae2d55c1e11 100644 --- a/packages/gatsby-plugin-google-analytics/src/gatsby-browser.js +++ b/packages/gatsby-plugin-google-analytics/src/gatsby-browser.js @@ -2,9 +2,9 @@ exports.onRouteUpdate = function({ location }) { // Don't track while developing. if (process.env.NODE_ENV === `production` && typeof ga === `function`) { window.ga( - `set`, - `page`, - location ? location.pathname + location.search + location.hash : undefined + `set`, + `page`, + location ? location.pathname + location.search + location.hash : undefined ) window.ga(`send`, `pageview`) } diff --git a/packages/gatsby-plugin-google-tagmanager/README.md b/packages/gatsby-plugin-google-tagmanager/README.md index b7edaeaf4b3d4..6276937cce1e1 100644 --- a/packages/gatsby-plugin-google-tagmanager/README.md +++ b/packages/gatsby-plugin-google-tagmanager/README.md @@ -24,4 +24,5 @@ plugins: [ ``` #### Note -Out of the box this plugin will simply load Google Tag Manager on the initial page/app load. It's up to you to fire tags based on changes in your app. To automatically track page changes, in GA for instance, you can configure your tags in GTM to trigger on [History Change](https://support.google.com/tagmanager/topic/7679384?hl=en&rd=1#HistoryChange). + +Out of the box this plugin will simply load Google Tag Manager on the initial page/app load. It's up to you to fire tags based on changes in your app. To automatically track page changes, in GA for instance, you can configure your tags in GTM to trigger on [History Change](https://support.google.com/tagmanager/topic/7679384?hl=en&rd=1#HistoryChange). diff --git a/packages/gatsby-plugin-sass/src/__tests__/gatsby-node.js b/packages/gatsby-plugin-sass/src/__tests__/gatsby-node.js index 654d095754766..ff6c1361da445 100644 --- a/packages/gatsby-plugin-sass/src/__tests__/gatsby-node.js +++ b/packages/gatsby-plugin-sass/src/__tests__/gatsby-node.js @@ -1,11 +1,15 @@ describe(`gatsby-plugin-sass`, () => { - jest.mock(`gatsby-1-config-extract-plugin`, () => {return { - extractTextPlugin: () => {return { - extract: (...args) => { - return { extractTextCalledWithArgs: args } + jest.mock(`gatsby-1-config-extract-plugin`, () => { + return { + extractTextPlugin: () => { + return { + extract: (...args) => { + return { extractTextCalledWithArgs: args } + }, + } }, - }}, - }}) + } + }) const { modifyWebpackConfig } = require(`../gatsby-node`) const cssLoader = expect.stringMatching(/^css/) ;[ diff --git a/packages/gatsby-remark-embed-snippet/README.md b/packages/gatsby-remark-embed-snippet/README.md index 3be9e1b10d467..6f0d13a3760df 100644 --- a/packages/gatsby-remark-embed-snippet/README.md +++ b/packages/gatsby-remark-embed-snippet/README.md @@ -119,7 +119,7 @@ quz: "highlighted" ```javascript // In your gatsby-config.js module.exports = { - plugins: [ + plugins: [ { resolve: `gatsby-transformer-remark`, options: { @@ -138,7 +138,7 @@ module.exports = { }, }, { - resolve: 'gatsby-remark-embed-snippet', + resolve: "gatsby-remark-embed-snippet", options: { // Class prefix for
 tags containing syntax highlighting;
               // defaults to 'language-' (eg 
).
@@ -147,7 +147,7 @@ module.exports = {
               // you may use this to prevent Prism from re-processing syntax.
               // This is an uncommon use-case though;
               // If you're unsure, it's best to use the default value.
-              classPrefix: 'language-',
+              classPrefix: "language-",
 
               // Example code links are relative to this dir.
               // eg examples/path/to/file.js
@@ -157,6 +157,6 @@ module.exports = {
         ],
       },
     },
-  ]
-}
+  ],
+};
 ```
diff --git a/packages/gatsby-remark-images/README.md b/packages/gatsby-remark-images/README.md
index 25ecff0708990..446ab3762ebea 100644
--- a/packages/gatsby-remark-images/README.md
+++ b/packages/gatsby-remark-images/README.md
@@ -48,7 +48,7 @@ plugins: [
 | ---------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
 | `maxWidth`             | `650`   | The `maxWidth` in pixels of the div where the markdown will be displayed. This value is used when deciding what the width of the various responsive thumbnails should be.                                                                                                                                                                                                                                                              |
 | `linkImagesToOriginal` | `true`  | Add a link to each image to the original image. Sometimes people want to see a full-sized version of an image e.g. to see extra detail on a part of the image and this is a convenient and common pattern for enabling this. Set this option to false to disable this behavior.                                                                                                                                                        |
-| `showCaptions`         | `false` | Add a caption to each image with the contents of the title attribute, when this is not empty. Set this option to true to enable this behavior.                                                                                                                                                                                                                                                                                       |
+| `showCaptions`         | `false` | Add a caption to each image with the contents of the title attribute, when this is not empty. Set this option to true to enable this behavior.                                                                                                                                                                                                                                                                                         |
 | `sizeByPixelDensity`   | `false` | Analyze images' pixel density to make decisions about target image size. This is what GitHub is doing when embedding images in tickets. This is a useful setting for documentation pages with a lot of screenshots. It can have unintended side effects on high pixel density artworks.

Example: A screenshot made on a retina screen with a resolution of 144 (e.g. Macbook) and a width of 100px, will be rendered at 50px. | | `wrapperStyle` | | Add custom styles to the div wrapping the responsive images. Use the syntax for the style attribute e.g. `margin-bottom:10px; background: red;` | | `backgroundColor` | `white` | Set the background color of the image to match the background image of your design | diff --git a/packages/gatsby-remark-images/src/index.js b/packages/gatsby-remark-images/src/index.js index 0a7dadd536988..48469a96e0558 100644 --- a/packages/gatsby-remark-images/src/index.js +++ b/packages/gatsby-remark-images/src/index.js @@ -130,7 +130,7 @@ module.exports = ( ` } - // Wrap in figure and use title as caption + // Wrap in figure and use title as caption if (options.showCaptions && node.title) { rawHTML = ` diff --git a/packages/gatsby-transformer-remark/README.md b/packages/gatsby-transformer-remark/README.md index 237298a4fe837..42549e6c6526c 100644 --- a/packages/gatsby-transformer-remark/README.md +++ b/packages/gatsby-transformer-remark/README.md @@ -10,7 +10,7 @@ Parses Markdown files using [Remark](http://remark.js.org/). ```javascript // In your gatsby-config.js -plugins: [`gatsby-transformer-remark`] +plugins: [`gatsby-transformer-remark`]; ``` A full explanation of how to use markdown in Gatsby can be found here: diff --git a/packages/gatsby/src/bootstrap/resolve-module-exports.js b/packages/gatsby/src/bootstrap/resolve-module-exports.js index 59c9f77ce5bda..a4c786f1dc6b5 100644 --- a/packages/gatsby/src/bootstrap/resolve-module-exports.js +++ b/packages/gatsby/src/bootstrap/resolve-module-exports.js @@ -48,7 +48,10 @@ module.exports = (modulePath, resolver = require.resolve) => { traverse(ast, { // get foo from `export const foo = bar` ExportNamedDeclaration: function ExportNamedDeclaration(astPath) { - const exportName = get(astPath, `node.declaration.declarations[0].id.name`) + const exportName = get( + astPath, + `node.declaration.declarations[0].id.name` + ) if (exportName) exportNames.push(exportName) }, AssignmentExpression: function AssignmentExpression(astPath) { diff --git a/packages/gatsby/src/commands/develop.js b/packages/gatsby/src/commands/develop.js index 0da4f0901a11e..63daee03ac1d3 100644 --- a/packages/gatsby/src/commands/develop.js +++ b/packages/gatsby/src/commands/develop.js @@ -372,7 +372,11 @@ module.exports = async (program: any) => { // options so we are going to "massage" the warnings and errors and present // them in a readable focused way. const messages = formatWebpackMessages(stats.toJson({}, true)) - const urls = prepareUrls(program.ssl ? `https` : `http`, program.host, program.port) + const urls = prepareUrls( + program.ssl ? `https` : `http`, + program.host, + program.port + ) const isSuccessful = !messages.errors.length && !messages.warnings.length // if (isSuccessful) { // console.log(chalk.green(`Compiled successfully!`)) diff --git a/packages/gatsby/src/redux/__tests__/nodes.js b/packages/gatsby/src/redux/__tests__/nodes.js index 2a7436db0e557..2417c8433061e 100644 --- a/packages/gatsby/src/redux/__tests__/nodes.js +++ b/packages/gatsby/src/redux/__tests__/nodes.js @@ -436,4 +436,9 @@ describe(`Create and update nodes`, () => { expect(callActionCreator).toThrowErrorMatchingSnapshot() }) + + it(`does not crash when delete node is called on undefined`, () => { + boundActionCreators.deleteNode(undefined, undefined, { name: `tests` }) + expect(Object.keys(store.getState().nodes).length).toEqual(0) + }) }) diff --git a/packages/gatsby/src/redux/actions.js b/packages/gatsby/src/redux/actions.js index 0e535752c2bef..a8298caff8df0 100644 --- a/packages/gatsby/src/redux/actions.js +++ b/packages/gatsby/src/redux/actions.js @@ -412,13 +412,17 @@ actions.createLayout = ( * deleteNode(node.id, node) */ actions.deleteNode = (nodeId: string, node: any, plugin: Plugin) => { - // Also delete any nodes transformed from this one. let deleteDescendantsActions - const descendantNodes = findChildrenRecursively(node.children) - if (descendantNodes.length > 0) { - deleteDescendantsActions = descendantNodes.map(n => - actions.deleteNode(n, getNode(n), plugin) - ) + // It's possible the file node was never created as sometimes tools will + // write and then immediately delete temporary files to the file system. + if (node) { + // Also delete any nodes transformed from this one. + const descendantNodes = findChildrenRecursively(node.children) + if (descendantNodes.length > 0) { + deleteDescendantsActions = descendantNodes.map(n => + actions.deleteNode(n, getNode(n), plugin) + ) + } } const deleteAction = { @@ -970,8 +974,8 @@ actions.createRedirect = ({ } /** - * All defined actions. - */ + * All defined actions. + */ exports.actions = actions /** diff --git a/packages/gatsby/src/redux/index.js b/packages/gatsby/src/redux/index.js index 653937d9d13d7..72a07fbb011b9 100644 --- a/packages/gatsby/src/redux/index.js +++ b/packages/gatsby/src/redux/index.js @@ -86,10 +86,10 @@ exports.emitter = emitter exports.store = store /** - * Get all nodes from redux store. - * - * @returns {Array} - */ + * Get all nodes from redux store. + * + * @returns {Array} + */ exports.getNodes = () => { let nodes = _.values(store.getState().nodes) return nodes ? nodes : [] @@ -97,19 +97,19 @@ exports.getNodes = () => { const getNode = id => store.getState().nodes[id] /** Get node by id from store. - * - * @param {string} id - * @returns {Object} - */ + * + * @param {string} id + * @returns {Object} + */ exports.getNode = getNode /** - * Determine if node has changed. - * - * @param {string} id - * @param {string} digest - * @returns {boolean} - */ + * Determine if node has changed. + * + * @param {string} id + * @param {string} digest + * @returns {boolean} + */ exports.hasNodeChanged = (id, digest) => { const node = store.getState().nodes[id] if (!node) { @@ -120,11 +120,11 @@ exports.hasNodeChanged = (id, digest) => { } /** - * Get content for a node from the plugin that created it. - * - * @param {Object} node - * @returns {promise} - */ + * Get content for a node from the plugin that created it. + * + * @param {Object} node + * @returns {promise} + */ exports.loadNodeContent = node => { if (_.isString(node.internal.content)) { return Promise.resolve(node.internal.content) @@ -150,12 +150,12 @@ exports.loadNodeContent = node => { } /** - * Get node and save path dependency. - * - * @param {string} id - * @param {string} path - * @returns {Object} node - */ + * Get node and save path dependency. + * + * @param {string} id + * @param {string} path + * @returns {Object} node + */ exports.getNodeAndSavePathDependency = (id, path) => { const { createPageDependency } = require(`./actions/add-page-dependency`) const node = getNode(id) diff --git a/packages/gatsby/src/utils/cache.js b/packages/gatsby/src/utils/cache.js index 7f99d308516f0..733b92b6e445b 100644 --- a/packages/gatsby/src/utils/cache.js +++ b/packages/gatsby/src/utils/cache.js @@ -7,8 +7,8 @@ let db let directory /** - * Initialize cache store. Reuse existing store if available. - */ + * Initialize cache store. Reuse existing store if available. + */ exports.initCache = () => { fs.ensureDirSync(`${process.cwd()}/.cache/cache`) if (process.env.NODE_ENV === `test`) { @@ -39,10 +39,10 @@ exports.initCache = () => { } /** - * Get value of key - * @param key - * @returns {Promise} - */ + * Get value of key + * @param key + * @returns {Promise} + */ exports.get = key => new Promise((resolve, reject) => { let pair @@ -63,11 +63,11 @@ exports.get = key => }) /** - * Create or update key with value - * @param key - * @param value - * @returns {Promise} - Promise object which resolves to 'Ok' if successful. - */ + * Create or update key with value + * @param key + * @param value + * @returns {Promise} - Promise object which resolves to 'Ok' if successful. + */ exports.set = (key, value) => new Promise((resolve, reject) => { db diff --git a/www/src/components/search-form.js b/www/src/components/search-form.js index 8c59f4e3212fa..b56ea38463a31 100644 --- a/www/src/components/search-form.js +++ b/www/src/components/search-form.js @@ -283,7 +283,7 @@ class SearchForm extends Component { openOnFocus: true, autoselect: true, hint: false, - keyboardShortcuts: ['s'] + keyboardShortcuts: [`s`], }, }) } diff --git a/yarn.lock b/yarn.lock index db242834436d2..84b57e0e30a62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,6 +10,12 @@ esutils "^2.0.2" js-tokens "^3.0.0" +"@babel/code-frame@7.0.0-beta.42": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.42.tgz#a9c83233fa7cd06b39dc77adbb908616ff4f1962" + dependencies: + "@babel/highlight" "7.0.0-beta.42" + "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.39" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.39.tgz#91c90bb65207fc5a55128cb54956ded39e850457" @@ -18,6 +24,16 @@ esutils "^2.0.2" js-tokens "^3.0.0" +"@babel/generator@7.0.0-beta.42": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.42.tgz#777bb50f39c94a7e57f73202d833141f8159af33" + dependencies: + "@babel/types" "7.0.0-beta.42" + jsesc "^2.5.1" + lodash "^4.2.0" + source-map "^0.5.0" + trim-right "^1.0.1" + "@babel/helper-function-name@7.0.0-beta.36": version "7.0.0-beta.36" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.36.tgz#366e3bc35147721b69009f803907c4d53212e88d" @@ -26,12 +42,47 @@ "@babel/template" "7.0.0-beta.36" "@babel/types" "7.0.0-beta.36" +"@babel/helper-function-name@7.0.0-beta.42": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.42.tgz#b38b8f4f85168d1812c543dd700b5d549b0c4658" + dependencies: + "@babel/helper-get-function-arity" "7.0.0-beta.42" + "@babel/template" "7.0.0-beta.42" + "@babel/types" "7.0.0-beta.42" + "@babel/helper-get-function-arity@7.0.0-beta.36": version "7.0.0-beta.36" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.36.tgz#f5383bac9a96b274828b10d98900e84ee43e32b8" dependencies: "@babel/types" "7.0.0-beta.36" +"@babel/helper-get-function-arity@7.0.0-beta.42": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.42.tgz#ad072e32f912c033053fc80478169aeadc22191e" + dependencies: + "@babel/types" "7.0.0-beta.42" + +"@babel/helper-split-export-declaration@7.0.0-beta.42": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.42.tgz#0d0d5254220a9cc4e7e226240306b939dc210ee7" + dependencies: + "@babel/types" "7.0.0-beta.42" + +"@babel/highlight@7.0.0-beta.42": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.42.tgz#a502a1c0d6f99b2b0e81d468a1b0c0e81e3f3623" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +"@babel/runtime@^7.0.0-beta.40": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0-beta.42.tgz#352e40c92e0460d3e82f49bd7e79f6cda76f919f" + dependencies: + core-js "^2.5.3" + regenerator-runtime "^0.11.1" + "@babel/template@7.0.0-beta.36": version "7.0.0-beta.36" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.36.tgz#02e903de5d68bd7899bce3c5b5447e59529abb00" @@ -41,6 +92,15 @@ babylon "7.0.0-beta.36" lodash "^4.2.0" +"@babel/template@7.0.0-beta.42": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.42.tgz#7186d4e70d44cdec975049ba0a73bdaf5cdee052" + dependencies: + "@babel/code-frame" "7.0.0-beta.42" + "@babel/types" "7.0.0-beta.42" + babylon "7.0.0-beta.42" + lodash "^4.2.0" + "@babel/traverse@7.0.0-beta.36": version "7.0.0-beta.36" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.36.tgz#1dc6f8750e89b6b979de5fe44aa993b1a2192261" @@ -54,6 +114,21 @@ invariant "^2.2.0" lodash "^4.2.0" +"@babel/traverse@^7.0.0-beta.40": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.42.tgz#f4bf4d1e33d41baf45205e2d0463591d57326285" + dependencies: + "@babel/code-frame" "7.0.0-beta.42" + "@babel/generator" "7.0.0-beta.42" + "@babel/helper-function-name" "7.0.0-beta.42" + "@babel/helper-split-export-declaration" "7.0.0-beta.42" + "@babel/types" "7.0.0-beta.42" + babylon "7.0.0-beta.42" + debug "^3.1.0" + globals "^11.1.0" + invariant "^2.2.0" + lodash "^4.2.0" + "@babel/types@7.0.0-beta.36": version "7.0.0-beta.36" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.36.tgz#64f2004353de42adb72f9ebb4665fc35b5499d23" @@ -62,6 +137,14 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" +"@babel/types@7.0.0-beta.42": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.42.tgz#1e2118767684880f6963801b272fd2b3348efacc" + dependencies: + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^2.0.0" + "@types/configstore@^2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@types/configstore/-/configstore-2.1.1.tgz#cd1e8553633ad3185c3f2f239ecff5d2643e92b6" @@ -1592,6 +1675,10 @@ babylon@7.0.0-beta.36: version "7.0.0-beta.36" resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.36.tgz#3a3683ba6a9a1e02b0aa507c8e63435e39305b9e" +babylon@7.0.0-beta.42, babylon@^7.0.0-beta.40: + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.42.tgz#67cfabcd4f3ec82999d29031ccdea89d0ba99657" + babylon@^6.17.2, babylon@^6.17.3, babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" @@ -3042,7 +3129,7 @@ core-js@^1.0.0, core-js@^1.2.6: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" -core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0, core-js@^2.5.1: +core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0, core-js@^2.5.1, core-js@^2.5.3: version "2.5.3" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" @@ -7346,6 +7433,10 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" + jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -11348,7 +11439,7 @@ regenerator-runtime@^0.10.5: version "0.10.5" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" -regenerator-runtime@^0.11.0: +regenerator-runtime@^0.11.0, regenerator-runtime@^0.11.1: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" From 7df37b7fa90426b371ad73e3287cfeb28030df57 Mon Sep 17 00:00:00 2001 From: Gilad Ronat Date: Mon, 26 Mar 2018 14:25:51 -0700 Subject: [PATCH 12/26] Change the name & description of gatsbyjs.org (#4713) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of: You can now view gatsby-starter-default in the browser. It’s now: You can now view gatsbyjs.org in the browser. --- www/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/package.json b/www/package.json index 28aa610f6b8b1..78ea4b65790af 100644 --- a/www/package.json +++ b/www/package.json @@ -1,6 +1,6 @@ { - "name": "gatsby-starter-default", - "description": "Gatsby default starter", + "name": "gatsbyjs.org", + "description": "Gatsby's Website", "version": "1.0.0", "author": "Kyle Mathews ", "dependencies": { From c707cd17446e4f23d0015a286ce4609208b6b50b Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Mon, 26 Mar 2018 14:55:06 -0700 Subject: [PATCH 13/26] Publish - gatsby-1-config-extract-plugin@1.0.3 - gatsby-cli@1.1.49 - gatsby-plugin-fullstory@1.0.3 - gatsby-plugin-google-analytics@1.0.25 - gatsby-plugin-google-tagmanager@1.0.17 - gatsby-plugin-sass@1.0.25 - gatsby-remark-embed-snippet@1.0.17 - gatsby-remark-images@1.5.60 - gatsby-transformer-remark@1.7.38 - gatsby@1.9.242 --- packages/gatsby-1-config-extract-plugin/package.json | 2 +- packages/gatsby-cli/package.json | 2 +- packages/gatsby-plugin-fullstory/package.json | 2 +- packages/gatsby-plugin-google-analytics/package.json | 2 +- packages/gatsby-plugin-google-tagmanager/package.json | 2 +- packages/gatsby-plugin-sass/package.json | 4 ++-- packages/gatsby-remark-embed-snippet/package.json | 2 +- packages/gatsby-remark-images/package.json | 2 +- packages/gatsby-transformer-remark/package.json | 2 +- packages/gatsby/package.json | 6 +++--- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/gatsby-1-config-extract-plugin/package.json b/packages/gatsby-1-config-extract-plugin/package.json index 47760128aa568..3973c31a8a09e 100644 --- a/packages/gatsby-1-config-extract-plugin/package.json +++ b/packages/gatsby-1-config-extract-plugin/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-1-config-extract-plugin", "description": "extract-text-webpack-plugin instance getter for Gatsby v1 plugins", - "version": "1.0.2", + "version": "1.0.3", "author": "Shawn Erquhart", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" diff --git a/packages/gatsby-cli/package.json b/packages/gatsby-cli/package.json index ee44cd59f9491..127abeb839e6a 100644 --- a/packages/gatsby-cli/package.json +++ b/packages/gatsby-cli/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-cli", "description": "Gatsby command-line interface for creating new sites and running Gatsby commands", - "version": "1.1.48", + "version": "1.1.49", "author": "Kyle Mathews ", "bin": { "gatsby": "lib/index.js" diff --git a/packages/gatsby-plugin-fullstory/package.json b/packages/gatsby-plugin-fullstory/package.json index 96509fe606422..92e6cd709d863 100644 --- a/packages/gatsby-plugin-fullstory/package.json +++ b/packages/gatsby-plugin-fullstory/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-plugin-fullstory", - "version": "1.0.2", + "version": "1.0.3", "description": "Plugin to add the tracking code for Fullstory.com", "main": "index.js", "scripts": { diff --git a/packages/gatsby-plugin-google-analytics/package.json b/packages/gatsby-plugin-google-analytics/package.json index baef2b9a7b938..0a187629be9b1 100644 --- a/packages/gatsby-plugin-google-analytics/package.json +++ b/packages/gatsby-plugin-google-analytics/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-plugin-google-analytics", "description": "Gatsby plugin to add google analytics onto a site", - "version": "1.0.24", + "version": "1.0.25", "author": "Kyle Mathews ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" diff --git a/packages/gatsby-plugin-google-tagmanager/package.json b/packages/gatsby-plugin-google-tagmanager/package.json index d98dcff6d06a0..ac762ff25f950 100644 --- a/packages/gatsby-plugin-google-tagmanager/package.json +++ b/packages/gatsby-plugin-google-tagmanager/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-plugin-google-tagmanager", "description": "Gatsby plugin to add google tagmanager onto a site", - "version": "1.0.16", + "version": "1.0.17", "author": "Thijs Koerselman ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" diff --git a/packages/gatsby-plugin-sass/package.json b/packages/gatsby-plugin-sass/package.json index 693253b37d8c9..4a0911011988b 100644 --- a/packages/gatsby-plugin-sass/package.json +++ b/packages/gatsby-plugin-sass/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-plugin-sass", "description": "Gatsby plugin to handle scss/sass files", - "version": "1.0.24", + "version": "1.0.25", "author": "Daniel Farrell ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" @@ -9,7 +9,7 @@ "dependencies": { "babel-runtime": "^6.26.0", "gatsby-1-config-css-modules": "^1.0.11", - "gatsby-1-config-extract-plugin": "^1.0.2", + "gatsby-1-config-extract-plugin": "^1.0.3", "node-sass": "^4.5.2", "sass-loader": "^4.1.1", "webpack": "^1.13.3" diff --git a/packages/gatsby-remark-embed-snippet/package.json b/packages/gatsby-remark-embed-snippet/package.json index 5de6c7ed87e83..faaa3c882d998 100644 --- a/packages/gatsby-remark-embed-snippet/package.json +++ b/packages/gatsby-remark-embed-snippet/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-remark-embed-snippet", "description": "Gatsby plugin to embed formatted code snippets within markdown", - "version": "1.0.16", + "version": "1.0.17", "author": "Brian Vaughn ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" diff --git a/packages/gatsby-remark-images/package.json b/packages/gatsby-remark-images/package.json index 672971c05ad1f..50c5e947a9b9a 100644 --- a/packages/gatsby-remark-images/package.json +++ b/packages/gatsby-remark-images/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-remark-images", "description": "Processes images in markdown so they can be used in the production build.", - "version": "1.5.59", + "version": "1.5.60", "author": "Kyle Mathews ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" diff --git a/packages/gatsby-transformer-remark/package.json b/packages/gatsby-transformer-remark/package.json index 39e6aa6eede6d..dde38b9aa0b7d 100644 --- a/packages/gatsby-transformer-remark/package.json +++ b/packages/gatsby-transformer-remark/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-transformer-remark", "description": "Gatsby transformer plugin for Markdown using the Remark library and ecosystem", - "version": "1.7.37", + "version": "1.7.38", "author": "Kyle Mathews ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 382069aaac85e..8eff2888667da 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -1,7 +1,7 @@ { "name": "gatsby", "description": "React.js Static Site Generator", - "version": "1.9.241", + "version": "1.9.242", "author": "Kyle Mathews ", "bin": { "gatsby": "./dist/bin/gatsby.js" @@ -49,8 +49,8 @@ "front-matter": "^2.1.0", "fs-extra": "^4.0.1", "gatsby-1-config-css-modules": "^1.0.11", - "gatsby-1-config-extract-plugin": "^1.0.2", - "gatsby-cli": "^1.1.48", + "gatsby-1-config-extract-plugin": "^1.0.3", + "gatsby-cli": "^1.1.49", "gatsby-link": "^1.6.39", "gatsby-module-loader": "^1.0.11", "gatsby-react-router-scroll": "^1.0.14", From ea3c4a229d5bef57358f678aff9a76177e1e5238 Mon Sep 17 00:00:00 2001 From: Scott Spence Date: Mon, 26 Mar 2018 23:11:25 +0100 Subject: [PATCH 14/26] Add docs page on setting up Linux for Gatsby (#4716) * new page an title * add in outline * build tools * node-install * links and preamble * debian too * Update gatsby-on-linux.md * Copy edits * Copy edits * Update gatsby-on-linux.md --- docs/docs/gatsby-on-linux.md | 69 ++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 docs/docs/gatsby-on-linux.md diff --git a/docs/docs/gatsby-on-linux.md b/docs/docs/gatsby-on-linux.md new file mode 100644 index 0000000000000..b5b412ba14690 --- /dev/null +++ b/docs/docs/gatsby-on-linux.md @@ -0,0 +1,69 @@ +--- +title: Gatsby on Linux +--- +# Linux + +TODO + +## Windows Subsystem Linux (WSL) + +As of October 17th 2017, Windows 10 ships with WSL and Linux distributions are available via the [Windows Store], there are several different distributions to use which can be configured via `wslconfig` if you have more than one distribution installed. + +```sh +# set default distribution to Ubuntu +wslconfig /setdefault ubuntu +``` + +### Using Windows Subsystem Linux: Ubuntu + +If you have a fresh install of Ubuntu then update and upgrade: + +```sh +sudo apt update +sudo apt -y upgrade +``` + +>Only use `-y` if you're happy to upgrade to the latest versions of the software. + +**Build tools** + +To compile and install native addons from npm you may also need to install build tools for `node-gyp`: + +```sh +sudo apt install -y build-essential +``` + +**Install node** + +Following the install instructions on nodejs.org leaves a slightly broken install (i.e. permission errors when trying to `npm install`). Instead try installing node versions using [n] which you can install with [n-install]: + +```sh +curl -L https://git.io/n-install | bash +``` + +There are other alternatives for managing you node versions such as [nvm] but this is known to slow down [bash startup] on WSL. + +### Using Windows Subsystem Linux: Debian + +Debian setup is nearly identical to Ubuntu except for the additional installs of `git` and `libpng-dev`. + +```sh +sudo apt update +sudo apt -y upgrade +sudo apt install build-essential +sudo apt install git +sudo apt install libpng-dev +``` + +Or to install all at the same time and approve (y) all installs: + +```sh +sudo apt update && sudo apt -y upgrade && sudo apt install build-essential && sudo apt install git && sudo apt install libpng-dev +``` + + +[windows store]: https://www.microsoft.com/en-us/store/p/ubuntu/9nblggh4msv6 +[n]: https://github.com/tj/n +[n-install]: https://github.com/mklement0/n-install +[nvm]: https://github.com/creationix/nvm +[bash startup]: https://github.com/Microsoft/WSL/issues/776#issuecomment-266112578 From dc79b61cee94b036b4089d80c18aca3e647d2ed9 Mon Sep 17 00:00:00 2001 From: Bart Nagel Date: Mon, 26 Mar 2018 15:16:23 -0700 Subject: [PATCH 15/26] Document gatsby-link being only for internal links (#4720) Add an example of a component which could be used to automatically choose or gatsby-link depending on the destination. Resolves #4662. --- packages/gatsby-link/README.md | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/packages/gatsby-link/README.md b/packages/gatsby-link/README.md index 10346a79aebee..f2633fcc39ecf 100644 --- a/packages/gatsby-link/README.md +++ b/packages/gatsby-link/README.md @@ -93,3 +93,42 @@ const IndexLayout = ({ children, location }) => { ); }; ``` + +## For internal links only! + +Note that this component is intended only for links to pages handled by Gatsby. + +If the `to` prop is on a different domain (such as a full off-site URL) the +behavior is undefined, and the user will likely not be taken to the expected +location. +Links will fail similarly if the `to` prop points somewhere on the same domain +but handled by something other than Gatsby (which may be the case if your server +proxies requests for certain paths to a different application). + +Sometimes you won't know ahead of time whether a link will be internal or not, +such as when the data is coming from a CMS. +In these cases you may find it useful to make a component which inspects the +link and renders either with `gatsby-link` or with a regular `` tag +accordingly. +Since deciding whether a link is internal or not depends on the site in +question, you may need to customize the heuristic to your environment, but the +following may be a good starting point: + +```jsx +import GatsbyLink from "gatsby-link"; + +const Link = ({ children, to, ...other }) => { + // Tailor the following test to your environment. + // This example assumes that any internal link (intended for Gatsby) + // will start with exactly one slash, and that anything else is external. + const internal = /^\/(?!\/)/.test(to); + + // Use gatsby-link for internal links, and for others + if (internal) { + return {children}; + } + return {children}; +}; + +export default Link; +``` From dccf6512de353ec1fa4ece7c998e922d910f7407 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Mon, 26 Mar 2018 15:26:23 -0700 Subject: [PATCH 16/26] Add support for the Styled Components Babel plugin (#4722) --- examples/using-styled-components/package.json | 23 ++++++------- .../gatsby-plugin-styled-components/README.md | 2 +- .../package.json | 3 +- .../src/gatsby-node.js | 33 +++++++++++++++++++ packages/gatsby/src/utils/babel-config.js | 1 + 5 files changed, 49 insertions(+), 13 deletions(-) diff --git a/examples/using-styled-components/package.json b/examples/using-styled-components/package.json index 57ad93ba39444..1c2cbceb40e36 100644 --- a/examples/using-styled-components/package.json +++ b/examples/using-styled-components/package.json @@ -5,17 +5,18 @@ "version": "1.0.0", "author": "Kyle Mathews ", "dependencies": { - "gatsby": "latest", - "gatsby-link": "latest", - "gatsby-plugin-google-analytics": "latest", - "gatsby-plugin-offline": "latest", - "gatsby-plugin-styled-components": "latest", - "lodash": "^4.16.4", - "react-typography": "^0.15.0", - "slash": "^1.0.0", - "styled-components": "^2.2.3", - "typography": "^0.15.8", - "typography-breakpoint-constants": "^0.14.0" + "babel-plugin-styled-components": "^1.5.1", + "gatsby": "1.9.242", + "gatsby-link": "1.6.39", + "gatsby-plugin-google-analytics": "1.0.25", + "gatsby-plugin-offline": "1.0.15", + "gatsby-plugin-styled-components": "2.0.10", + "lodash": "^4.17.5", + "react-typography": "^0.16.13", + "slash": "^2.0.0", + "styled-components": "^3.2.3", + "typography": "^0.16.6", + "typography-breakpoint-constants": "^0.15.10" }, "keywords": [ "gatsby" diff --git a/packages/gatsby-plugin-styled-components/README.md b/packages/gatsby-plugin-styled-components/README.md index bffd5090030c8..28a28c98746f0 100644 --- a/packages/gatsby-plugin-styled-components/README.md +++ b/packages/gatsby-plugin-styled-components/README.md @@ -6,7 +6,7 @@ built-in server-side rendering support. ## Install -`npm install --save gatsby-plugin-styled-components styled-components` +`npm install --save gatsby-plugin-styled-components styled-components babel-plugin-styled-components` ## How to use diff --git a/packages/gatsby-plugin-styled-components/package.json b/packages/gatsby-plugin-styled-components/package.json index efe7260a8d849..d063f93cc1696 100644 --- a/packages/gatsby-plugin-styled-components/package.json +++ b/packages/gatsby-plugin-styled-components/package.json @@ -22,7 +22,8 @@ "main": "index.js", "peerDependencies": { "gatsby": "^1.0.0", - "styled-components": ">= 2.0.0" + "styled-components": ">= 2.0.0", + "babel-plugin-styled-components": ">1.5.0" }, "repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-styled-components", "scripts": { diff --git a/packages/gatsby-plugin-styled-components/src/gatsby-node.js b/packages/gatsby-plugin-styled-components/src/gatsby-node.js index e69de29bb2d1d..52fcb595e6aa8 100644 --- a/packages/gatsby-plugin-styled-components/src/gatsby-node.js +++ b/packages/gatsby-plugin-styled-components/src/gatsby-node.js @@ -0,0 +1,33 @@ +// Add Babel plugin +let babelPluginExists = false +try { + require.resolve(`babel-plugin-styled-components`) + babelPluginExists = true +} catch (e) { + // Ignore +} + +exports.modifyBabelrc = ({ babelrc, stage }) => { + if (babelPluginExists) { + if (stage === `build-html`) { + return { + ...babelrc, + plugins: babelrc.plugins.concat([ + [ + `babel-plugin-styled-components`, + { + ssr: true, + }, + ], + ]), + } + } + + return { + ...babelrc, + plugins: babelrc.plugins.concat([`babel-plugin-styled-components`]), + } + } + + return babelrc +} diff --git a/packages/gatsby/src/utils/babel-config.js b/packages/gatsby/src/utils/babel-config.js index 59c95b64d6f94..88f89dbd71fba 100644 --- a/packages/gatsby/src/utils/babel-config.js +++ b/packages/gatsby/src/utils/babel-config.js @@ -179,6 +179,7 @@ module.exports = async function babelConfig(program, stage) { const normalizedConfig = normalizeConfig(babelrc, directory) let modifiedConfig = await apiRunnerNode(`modifyBabelrc`, { + stage, babelrc: normalizedConfig, }) if (modifiedConfig.length > 0) { From a4d779cc8436467b45bbc03c9a092903d1be3261 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Mon, 26 Mar 2018 15:27:13 -0700 Subject: [PATCH 17/26] Publish - gatsby-link@1.6.40 - gatsby-plugin-styled-components@2.0.11 - gatsby@1.9.243 --- packages/gatsby-link/package.json | 2 +- packages/gatsby-plugin-styled-components/package.json | 6 +++--- packages/gatsby/package.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/gatsby-link/package.json b/packages/gatsby-link/package.json index 90e24cf316b5c..7095d6ea7cc58 100644 --- a/packages/gatsby-link/package.json +++ b/packages/gatsby-link/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-link", "description": "An enhanced Link component for Gatsby sites with support for resource prefetching", - "version": "1.6.39", + "version": "1.6.40", "author": "Kyle Mathews ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" diff --git a/packages/gatsby-plugin-styled-components/package.json b/packages/gatsby-plugin-styled-components/package.json index d063f93cc1696..fc89021e06da7 100644 --- a/packages/gatsby-plugin-styled-components/package.json +++ b/packages/gatsby-plugin-styled-components/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-plugin-styled-components", "description": "Gatsby plugin to add support for styled components", - "version": "2.0.10", + "version": "2.0.11", "author": "Guten Ye ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" @@ -21,9 +21,9 @@ "license": "MIT", "main": "index.js", "peerDependencies": { + "babel-plugin-styled-components": ">1.5.0", "gatsby": "^1.0.0", - "styled-components": ">= 2.0.0", - "babel-plugin-styled-components": ">1.5.0" + "styled-components": ">= 2.0.0" }, "repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-styled-components", "scripts": { diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 8eff2888667da..2933374feafcf 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -1,7 +1,7 @@ { "name": "gatsby", "description": "React.js Static Site Generator", - "version": "1.9.242", + "version": "1.9.243", "author": "Kyle Mathews ", "bin": { "gatsby": "./dist/bin/gatsby.js" @@ -51,7 +51,7 @@ "gatsby-1-config-css-modules": "^1.0.11", "gatsby-1-config-extract-plugin": "^1.0.3", "gatsby-cli": "^1.1.49", - "gatsby-link": "^1.6.39", + "gatsby-link": "^1.6.40", "gatsby-module-loader": "^1.0.11", "gatsby-react-router-scroll": "^1.0.14", "glob": "^7.1.1", From 93eac4462ae0e8c75b782d81f9fa366b133c8467 Mon Sep 17 00:00:00 2001 From: Scott Spence Date: Tue, 27 Mar 2018 17:09:32 +0100 Subject: [PATCH 18/26] Fix typo on Linux docs page (#4728) * new page an title * add in outline * build tools * node-install * links and preamble * debian too * Update gatsby-on-linux.md * Copy edits * Copy edits * Update gatsby-on-linux.md * typo you, your * typo you, your --- docs/docs/gatsby-on-linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/gatsby-on-linux.md b/docs/docs/gatsby-on-linux.md index b5b412ba14690..73e80cbe3c54d 100644 --- a/docs/docs/gatsby-on-linux.md +++ b/docs/docs/gatsby-on-linux.md @@ -41,7 +41,7 @@ Following the install instructions on nodejs.org leaves a slightly broken instal curl -L https://git.io/n-install | bash ``` -There are other alternatives for managing you node versions such as [nvm] but this is known to slow down [bash startup] on WSL. +There are other alternatives for managing your node versions such as [nvm] but this is known to slow down [bash startup] on WSL. ### Using Windows Subsystem Linux: Debian From 05458c194d840a65dd88b577246796976b82b058 Mon Sep 17 00:00:00 2001 From: Cethy Date: Tue, 27 Mar 2018 18:12:36 +0200 Subject: [PATCH 19/26] Add Gatsby Starter Bloomer (#4731) Add new starter info to documentation --- docs/docs/gatsby-starters.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/docs/gatsby-starters.md b/docs/docs/gatsby-starters.md index d93245e368ede..634eaca9f126c 100644 --- a/docs/docs/gatsby-starters.md +++ b/docs/docs/gatsby-starters.md @@ -550,3 +550,13 @@ Community: * [Tailwind CSS](https://tailwindcss.com) Framework * Removes unused CSS with [Purgecss](https://www.purgecss.com/) * Includes responsive navigation and form examples + +* [gatsby-starter-bloomer](https://github.com/Cethy/gatsby-starter-bloomer) + [(demo)](https://gatsby-starter-bloomer.netlify.com/) + + Features: + + * Based on [gatsby-starter-default](https://github.com/gatsbyjs/gatsby-starter-default) + * [Bulma CSS Framework](https://bulma.io/) with its [Bloomer react components](https://bloomer.js.org/) + * [Font-Awesome icons](https://fontawesome.com/icons) + * Includes a simple fullscreen hero w/ footer example From ed6990dc74a3a478725ae812835745532ca7459f Mon Sep 17 00:00:00 2001 From: joehua87 Date: Wed, 28 Mar 2018 00:10:14 +0700 Subject: [PATCH 20/26] Add SSR support to i18next article (#4582) * Add SSR support to i18next article * Add note translate hoc (react-i18next) cause component not able to SSR --- .../index.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/docs/blog/2017-10-17-building-i18n-with-gatsby/index.md b/docs/blog/2017-10-17-building-i18n-with-gatsby/index.md index 7deaf3b757e37..a6d85ab05ce87 100644 --- a/docs/blog/2017-10-17-building-i18n-with-gatsby/index.md +++ b/docs/blog/2017-10-17-building-i18n-with-gatsby/index.md @@ -288,6 +288,55 @@ The `handleLanguageChange` function just wraps the `react-i18n` function passed in as a prop through `translate`. Pretty much everything is handled for us. Hooray! 🎉 +## SSR + +To let it render the content into html, you need to load i18n namespaces (using `i18n.loadNamespaces`) before render + +### With redux + +```js +// gatsby-ssr.js + +import React from 'react' +import { Provider } from 'react-redux' +import { renderToString } from 'react-dom/server' +import i18n from './src/i18n' + +import createStore from './src/state/createStore' + +exports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => { + i18n.loadNamespaces(['common'], () => { + const store = createStore() + const ConnectedBody = () => ( + {bodyComponent} + ) + replaceBodyHTMLString(renderToString()) + }) +} +``` + +### Without redux + +> Not yet tested + +```js +// gatsby-ssr.js + +import React from 'react' +import { renderToString } from 'react-dom/server' +import i18n from './src/i18n' + +import createStore from './src/state/createStore' + +exports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => { + i18n.loadNamespaces(['common'], () => { + replaceBodyHTMLString(bodyComponent) + }) +} +``` + +> `translate` hoc from react-i18next cause page / component not able to SSR. I make it works by import i18n & use i18n.t + ## Finishing up As you can see, i18n in Gatsby is actually pretty simple when you know how! We From b3b7dcc4c7166cd38faf4be782de46e000216905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6khan=20Sar=C4=B1?= Date: Tue, 27 Mar 2018 22:54:28 +0300 Subject: [PATCH 21/26] Add WebGazer to Showcase sites on README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 68db0e3a11e1a..e352062c9a884 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,7 @@ Websites built with Gatsby: * [Hapticmedia](https://hapticmedia.fr/en/) * [Philipp Czernitzki - Blog/Website](http://philippczernitzki.me) * [CodeBushi](https://codebushi.com/) +* [WebGazer](https://www.webgazer.io) ## Docs From 24bd7a8d2c7ce005c24b41a712679f8882d90c41 Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Wed, 28 Mar 2018 00:20:22 +0200 Subject: [PATCH 22/26] [gatsby-transformer-remark] Don't generate AST for same node multiple times in parallel. (#4734) If we are already generating AST for given node - wait for result of that. --- .../src/extend-node-type.js | 178 ++++++++++-------- 1 file changed, 98 insertions(+), 80 deletions(-) diff --git a/packages/gatsby-transformer-remark/src/extend-node-type.js b/packages/gatsby-transformer-remark/src/extend-node-type.js index c0f4dbe622ea7..1b6c03e3ae4d5 100644 --- a/packages/gatsby-transformer-remark/src/extend-node-type.js +++ b/packages/gatsby-transformer-remark/src/extend-node-type.js @@ -51,6 +51,14 @@ const tableOfContentsCacheKey = node => const withPathPrefix = (url, pathPrefix) => (pathPrefix + url).replace(/\/\//, `/`) +/** + * Map that keeps track of generation of AST to not generate it multiple + * times in parallel. + * + * @type {Map} + */ +const ASTPromiseMap = new Map() + module.exports = ( { type, store, pathPrefix, getNode, cache, reporter }, pluginOptions @@ -87,90 +95,28 @@ module.exports = ( } async function getAST(markdownNode) { - const cachedAST = await cache.get(astCacheKey(markdownNode)) + const cacheKey = astCacheKey(markdownNode) + const cachedAST = await cache.get(cacheKey) if (cachedAST) { return cachedAST + } else if (ASTPromiseMap.has(cacheKey)) { + // We are already generating AST, so let's wait for it + return await ASTPromiseMap.get(cacheKey) } else { - const files = _.values(store.getState().nodes).filter( - n => n.internal.type === `File` - ) - const ast = await new Promise((resolve, reject) => { - // Use Bluebird's Promise function "each" to run remark plugins serially. - Promise.each(pluginOptions.plugins, plugin => { - const requiredPlugin = require(plugin.resolve) - if (_.isFunction(requiredPlugin.mutateSource)) { - return requiredPlugin.mutateSource( - { - markdownNode, - files, - getNode, - reporter, - }, - plugin.pluginOptions - ) - } else { - return Promise.resolve() - } - }).then(() => { - const markdownAST = remark.parse(markdownNode.internal.content) - - if (pathPrefix) { - // Ensure relative links include `pathPrefix` - visit(markdownAST, `link`, node => { - if ( - node.url && - node.url.startsWith(`/`) && - !node.url.startsWith(`//`) - ) { - node.url = withPathPrefix(node.url, pathPrefix) - } - }) - } - - // source => parse (can order parsing for dependencies) => typegen - // - // source plugins identify nodes, provide id, initial parse, know - // when nodes are created/removed/deleted - // get passed cached DataTree and return list of clean and dirty nodes. - // Also get passed `dirtyNodes` function which they can call with an array - // of node ids which will then get re-parsed and the inferred schema - // recreated (if inferring schema gets too expensive, can also - // cache the schema until a query fails at which point recreate the - // schema). - // - // parse plugins take data from source nodes and extend it, never mutate - // it. Freeze all nodes once done so typegen plugins can't change it - // this lets us save off the DataTree at that point as well as create - // indexes. - // - // typegen plugins identify further types of data that should be lazily - // computed due to their expense, or are hard to infer graphql type - // (markdown ast), or are need user input in order to derive e.g. - // markdown headers or date fields. - // - // wrap all resolve functions to (a) auto-memoize and (b) cache to disk any - // resolve function that takes longer than ~10ms (do research on this - // e.g. how long reading/writing to cache takes), and (c) track which - // queries are based on which source nodes. Also if connection of what - // which are always rerun if their underlying nodes change.. - // - // every node type in DataTree gets a schema type automatically. - // typegen plugins just modify the auto-generated types to add derived fields - // as well as computationally expensive fields. - const files = _.values(store.getState().nodes).filter( - n => n.internal.type === `File` - ) + const ASTGenerationPromise = new Promise(async resolve => { + const files = _.values(store.getState().nodes).filter( + n => n.internal.type === `File` + ) + const ast = await new Promise((resolve, reject) => { // Use Bluebird's Promise function "each" to run remark plugins serially. Promise.each(pluginOptions.plugins, plugin => { const requiredPlugin = require(plugin.resolve) - if (_.isFunction(requiredPlugin)) { - return requiredPlugin( + if (_.isFunction(requiredPlugin.mutateSource)) { + return requiredPlugin.mutateSource( { - markdownAST, markdownNode, - getNode, files, - pathPrefix, + getNode, reporter, }, plugin.pluginOptions @@ -179,14 +125,86 @@ module.exports = ( return Promise.resolve() } }).then(() => { - resolve(markdownAST) + const markdownAST = remark.parse(markdownNode.internal.content) + + if (pathPrefix) { + // Ensure relative links include `pathPrefix` + visit(markdownAST, `link`, node => { + if ( + node.url && + node.url.startsWith(`/`) && + !node.url.startsWith(`//`) + ) { + node.url = withPathPrefix(node.url, pathPrefix) + } + }) + } + + // source => parse (can order parsing for dependencies) => typegen + // + // source plugins identify nodes, provide id, initial parse, know + // when nodes are created/removed/deleted + // get passed cached DataTree and return list of clean and dirty nodes. + // Also get passed `dirtyNodes` function which they can call with an array + // of node ids which will then get re-parsed and the inferred schema + // recreated (if inferring schema gets too expensive, can also + // cache the schema until a query fails at which point recreate the + // schema). + // + // parse plugins take data from source nodes and extend it, never mutate + // it. Freeze all nodes once done so typegen plugins can't change it + // this lets us save off the DataTree at that point as well as create + // indexes. + // + // typegen plugins identify further types of data that should be lazily + // computed due to their expense, or are hard to infer graphql type + // (markdown ast), or are need user input in order to derive e.g. + // markdown headers or date fields. + // + // wrap all resolve functions to (a) auto-memoize and (b) cache to disk any + // resolve function that takes longer than ~10ms (do research on this + // e.g. how long reading/writing to cache takes), and (c) track which + // queries are based on which source nodes. Also if connection of what + // which are always rerun if their underlying nodes change.. + // + // every node type in DataTree gets a schema type automatically. + // typegen plugins just modify the auto-generated types to add derived fields + // as well as computationally expensive fields. + const files = _.values(store.getState().nodes).filter( + n => n.internal.type === `File` + ) + // Use Bluebird's Promise function "each" to run remark plugins serially. + Promise.each(pluginOptions.plugins, plugin => { + const requiredPlugin = require(plugin.resolve) + if (_.isFunction(requiredPlugin)) { + return requiredPlugin( + { + markdownAST, + markdownNode, + getNode, + files, + pathPrefix, + reporter, + }, + plugin.pluginOptions + ) + } else { + return Promise.resolve() + } + }).then(() => { + resolve(markdownAST) + }) }) }) - }) - // Save new AST to cache and return - cache.set(astCacheKey(markdownNode), ast) - return ast + // Save new AST to cache and return + cache.set(astCacheKey(markdownNode), ast) + // We can now release promise, as we cached result + ASTPromiseMap.delete(astCacheKey) + return resolve(ast) + }) + ASTPromiseMap.set(cacheKey, ASTGenerationPromise) + return await ASTGenerationPromise } } From fe55f6d83e3281689cfa8327d71bc37bc229ae0e Mon Sep 17 00:00:00 2001 From: TJ Simons Date: Tue, 27 Mar 2018 17:28:12 -0500 Subject: [PATCH 23/26] Queue page requests to wp endpoints (#4735) * Wrap better-queue with Promise syntax that resolves when the queue drains * Queue requests for wp objects. Added config to set concurreny of the requests * Use concurrency instead of batchSize * Fix passing the config to the getPages function Fix how options are passed in to better-queue --- .../src/__tests__/request-in-queue.js | 49 ++++++++++++++++ packages/gatsby-source-wordpress/src/fetch.js | 27 ++++----- .../src/gatsby-node.js | 2 + .../src/request-in-queue.js | 58 +++++++++++++++++++ 4 files changed, 123 insertions(+), 13 deletions(-) create mode 100644 packages/gatsby-source-wordpress/src/__tests__/request-in-queue.js create mode 100644 packages/gatsby-source-wordpress/src/request-in-queue.js diff --git a/packages/gatsby-source-wordpress/src/__tests__/request-in-queue.js b/packages/gatsby-source-wordpress/src/__tests__/request-in-queue.js new file mode 100644 index 0000000000000..4c1ffd9a8f9ce --- /dev/null +++ b/packages/gatsby-source-wordpress/src/__tests__/request-in-queue.js @@ -0,0 +1,49 @@ +jest.mock(`axios`) + +const requestInQueue = require(`../request-in-queue`) +const axios = require(`axios`) + +axios.mockImplementation(opts => { + if (opts.throw) { throw new Error(opts.throw) } + + return opts.url.slice(opts.url.lastIndexOf(`/`) + 1) +}) + +describe(`requestInQueue`, () => { + let requests + + beforeEach(() => { + requests = [ + { method: `get`, url: `https://gatsbyjs.org/1` }, + { method: `get`, url: `https://gatsbyjs.org/2` }, + { method: `get`, url: `https://gatsbyjs.org/3` }, + { method: `get`, url: `https://gatsbyjs.org/4` }, + ] + }) + + afterEach(() => { + axios.mockClear() + }) + + it(`runs all requests in queue`, async () => { + await requestInQueue(requests) + + requests.forEach((req) => { + expect(axios).toHaveBeenCalledWith(req) + }) + }) + + it(`returns the values in the same order they were requested`, async () => { + const responses = await requestInQueue(requests) + expect(responses).toEqual([`1`, `2`, `3`, `4`]) + }) + + it(`stops any requests when one throws an error`, async () => { + try { + await requestInQueue([{ throw: `error` }, ...requests]) + } catch (err) { + expect(err).toBeDefined() + } + expect(axios).toHaveBeenCalledTimes(1) + }) +}) diff --git a/packages/gatsby-source-wordpress/src/fetch.js b/packages/gatsby-source-wordpress/src/fetch.js index 39ee4a9181d7b..42dba0ba8c296 100644 --- a/packages/gatsby-source-wordpress/src/fetch.js +++ b/packages/gatsby-source-wordpress/src/fetch.js @@ -3,6 +3,7 @@ const axios = require(`axios`) const _ = require(`lodash`) const colorized = require(`./output-color`) const httpExceptionHandler = require(`./http-exception-handler`) +const requestInQueue = require(`./request-in-queue`) /** * High-level function to coordinate fetching data from a WordPress @@ -18,6 +19,7 @@ async function fetch({ baseUrl, typePrefix, refactoredEntityTypes, + concurrentRequests, }) { // If the site is hosted on wordpress.com, the API Route differs. // Same entity types are exposed (excepted for medias and users which need auth) @@ -127,6 +129,7 @@ async function fetch({ _hostingWPCOM, _auth, _accessToken, + concurrentRequests, }) ) if (_verbose) console.log(``) @@ -185,6 +188,7 @@ async function fetchData({ _hostingWPCOM, _auth, _accessToken, + concurrentRequests, }) { const type = route.type const url = route.url @@ -200,7 +204,7 @@ async function fetchData({ if (_verbose) console.time(`Fetching the ${type} took`) let routeResponse = await getPages( - { url, _perPage, _hostingWPCOM, _auth, _accessToken }, + { url, _perPage, _hostingWPCOM, _auth, _accessToken, getPages, concurrentRequests }, 1 ) @@ -263,7 +267,7 @@ async function fetchData({ * @returns */ async function getPages( - { url, _perPage, _hostingWPCOM, _auth, _accessToken, _verbose }, + { url, _perPage, _hostingWPCOM, _auth, _accessToken, _verbose, concurrentRequests }, page = 1 ) { try { @@ -313,18 +317,16 @@ async function getPages( } // We got page 1, now we want pages 2 through totalPages - const requests = _.range(2, totalPages + 1).map(getPage => { - const options = getOptions(getPage) - return axios(options) - }) + const pageOptions = _.range(2, totalPages + 1).map(getPage => getOptions(getPage)) - return Promise.all(requests).then(pages => { - const data = pages.map(page => page.data) - data.forEach(list => { - result = result.concat(list) - }) - return result + const pages = await requestInQueue(pageOptions, { concurrent: concurrentRequests }) + + const pageData = pages.map(page => page.data) + pageData.forEach(list => { + result = result.concat(list) }) + + return result } catch (e) { return httpExceptionHandler(e) } @@ -349,7 +351,6 @@ function getValidRoutes({ refactoredEntityTypes, }) { let validRoutes = [] - for (let key of Object.keys(allRoutes.data.routes)) { if (_verbose) console.log(`Route discovered :`, key) let route = allRoutes.data.routes[key] diff --git a/packages/gatsby-source-wordpress/src/gatsby-node.js b/packages/gatsby-source-wordpress/src/gatsby-node.js index 37ad22f50370f..1707c004bd963 100644 --- a/packages/gatsby-source-wordpress/src/gatsby-node.js +++ b/packages/gatsby-source-wordpress/src/gatsby-node.js @@ -28,6 +28,7 @@ exports.sourceNodes = async ( verboseOutput, perPage = 100, searchAndReplaceContentUrls = {}, + concurrentRequests = 10, } ) => { const { createNode } = boundActionCreators @@ -48,6 +49,7 @@ exports.sourceNodes = async ( _perPage, typePrefix, refactoredEntityTypes, + concurrentRequests, }) // Normalize data & create nodes diff --git a/packages/gatsby-source-wordpress/src/request-in-queue.js b/packages/gatsby-source-wordpress/src/request-in-queue.js new file mode 100644 index 0000000000000..b462e5022a98f --- /dev/null +++ b/packages/gatsby-source-wordpress/src/request-in-queue.js @@ -0,0 +1,58 @@ +const Queue = require(`better-queue`) +const Promise = require(`bluebird`) +const request = require(`axios`) + +const _defaults = { + id: `url`, +} + +/** + * [handleQueue description] + * @param {[type]} task [description] + * @param {Function} cb [description] + * @return {[type]} [description] + */ +async function handleQueue(task, cb) { + try { + const response = await request(task) + cb(null, response) + } catch (err) { + cb(err) + } +} + +/** + * @typedef {Options} + * @type {Object} + * @see For a detailed descriptions of the options, + * see {@link https://www.npmjs.com/package/better-queue#full-documentation|better-queue on Github} + */ + +/** + * Run a series of requests tasks in a queue for better flow control + * + * @param {Object[]} tasks An array of Axios formatted request objects + * @param {Options} opts Options that will be given to better-queue + * @return {Promise} Resolves with the accumulated values from the tasks + */ +module.exports = function requestInQueue (tasks, opts = {}) { + return new Promise((res, rej) => { + const q = new Queue(handleQueue, { ..._defaults, ...opts }) + + const taskMap = new Map(tasks.map((t) => { + q.push(t) + return [t.url, null] + })) + + q.on(`task_failed`, (id, err) => { + rej(`${id} failed with err: ${err}`) + q.destroy() + }) + + q.on(`task_finish`, (id, response) => { + taskMap.set(id, response) + }) + + q.on(`drain`, () => res(Array.from(taskMap.values()))) + }) +} From ed279731fdb3d144e22f983e7975c9a891b1c74f Mon Sep 17 00:00:00 2001 From: Sriram Thiagarajan Date: Wed, 28 Mar 2018 04:07:50 +0530 Subject: [PATCH 24/26] [www] Move Plugins page from /packages to /plugins (#4705) * move plugins page from /packages to /plugins * revert package slug to /packages * /packages instead of /plugins as path for packages * fix formatting * Update index.js * Update index.js * Fix sidebar --- www/gatsby-node.js | 6 ++++++ www/src/components/navigation-mobile.js | 2 +- www/src/components/navigation.js | 2 +- www/src/layouts/index.js | 16 +++++++++------- www/src/pages/{packages.js => plugins.js} | 0 5 files changed, 17 insertions(+), 9 deletions(-) rename www/src/pages/{packages.js => plugins.js} (100%) diff --git a/www/gatsby-node.js b/www/gatsby-node.js index 7b5171f906f65..1dd5e997c5844 100644 --- a/www/gatsby-node.js +++ b/www/gatsby-node.js @@ -34,6 +34,12 @@ exports.createPages = ({ graphql, boundActionCreators }) => { isPermanent: true, }) + createRedirect({ + fromPath: `/packages/`, // Moved "Plugins" page from /packages to /plugins + toPath: `/plugins/`, + isPermanent: true, + }) + return new Promise((resolve, reject) => { const docsTemplate = path.resolve(`src/templates/template-docs-markdown.js`) const blogPostTemplate = path.resolve(`src/templates/template-blog-post.js`) diff --git a/www/src/components/navigation-mobile.js b/www/src/components/navigation-mobile.js index 9140644af5432..39944104ad987 100644 --- a/www/src/components/navigation-mobile.js +++ b/www/src/components/navigation-mobile.js @@ -52,7 +52,7 @@ const MobileNavigation = () => ( > - + ) diff --git a/www/src/components/navigation.js b/www/src/components/navigation.js index 0c272b3f5f657..61a4bc2ed159e 100644 --- a/www/src/components/navigation.js +++ b/www/src/components/navigation.js @@ -152,7 +152,7 @@ export default ({ pathname }) => { > Docs Tutorial - Plugins + Plugins Features Blog diff --git a/www/src/layouts/index.js b/www/src/layouts/index.js index cf820299311c9..0902fdca7c97e 100644 --- a/www/src/layouts/index.js +++ b/www/src/layouts/index.js @@ -31,18 +31,20 @@ class DefaultLayout extends React.Component { const isTutorial = this.props.location.pathname.slice(0, 10) === `/tutorial/` const isFeature = this.props.location.pathname.slice(0, 9) === `/features` - const isPackage = this.props.location.pathname.slice(0, 9) === `/packages` + const isPackageSearchPage = + this.props.location.pathname.slice(0, 8) === `/plugins` || + this.props.location.pathname.slice(0, 9) === `/packages` const isPackageReadme = this.props.location.pathname.slice(0, 16) === `/packages/gatsby` const hasSidebar = - isDoc || isTutorial || isFeature || isPackage || isPackageReadme + isDoc || isTutorial || isFeature || isPackageSearchPage || isPackageReadme const isSearchSource = hasSidebar || isBlog const packageSidebarWidth = rhythm(17) const leftPadding = rhythmSize => { - if (this.props.location.pathname.slice(0, 9) === `/packages`) { + if (isPackageReadme || isPackageSearchPage) { return packageSidebarWidth } else if (hasSidebar) { return rhythm(rhythmSize) @@ -83,11 +85,11 @@ class DefaultLayout extends React.Component { let searchBarDisplayProperty let childrenMobileDisplay let childrenTabletDisplay - if (isPackage && !isPackageReadme) { + if (isPackageSearchPage && !isPackageReadme) { searchBarDisplayProperty = { display: `block` } childrenMobileDisplay = { display: `none` } childrenTabletDisplay = { display: `block` } - } else if (isPackage && isPackageReadme) { + } else if (isPackageSearchPage && isPackageReadme) { searchBarDisplayProperty = { [presets.Mobile]: { display: `none`, @@ -155,9 +157,9 @@ class DefaultLayout extends React.Component { css={{ ...searchbarStyles, [presets.Tablet]: { - display: isPackage + display: isPackageSearchPage ? `block` - : isPackage && isPackageReadme ? `block` : `none`, + : isPackageSearchPage && isPackageReadme ? `block` : `none`, width: packageSidebarWidth, position: `fixed`, background: colors.ui.whisper, diff --git a/www/src/pages/packages.js b/www/src/pages/plugins.js similarity index 100% rename from www/src/pages/packages.js rename to www/src/pages/plugins.js From e811a0edd95b31f5ad9497d49226b44af9b52e75 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Tue, 27 Mar 2018 15:39:42 -0700 Subject: [PATCH 25/26] Publish - gatsby-source-wordpress@2.0.70 - gatsby-transformer-remark@1.7.39 --- packages/gatsby-source-wordpress/package.json | 2 +- packages/gatsby-transformer-remark/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/gatsby-source-wordpress/package.json b/packages/gatsby-source-wordpress/package.json index 4ca62aca3372b..33d6817501578 100644 --- a/packages/gatsby-source-wordpress/package.json +++ b/packages/gatsby-source-wordpress/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-source-wordpress", "description": "Gatsby source plugin for building websites using the Wordpress CMS as a data source.", - "version": "2.0.69", + "version": "2.0.70", "author": "Sebastien Fichot ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" diff --git a/packages/gatsby-transformer-remark/package.json b/packages/gatsby-transformer-remark/package.json index dde38b9aa0b7d..57891779fb057 100644 --- a/packages/gatsby-transformer-remark/package.json +++ b/packages/gatsby-transformer-remark/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-transformer-remark", "description": "Gatsby transformer plugin for Markdown using the Remark library and ecosystem", - "version": "1.7.38", + "version": "1.7.39", "author": "Kyle Mathews ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" From 532d571c145ea15236445363d327639bf2db08ef Mon Sep 17 00:00:00 2001 From: Denis Croitoru Date: Wed, 28 Mar 2018 16:08:26 +0300 Subject: [PATCH 26/26] Add gatsby-starter-i18n-lingui (#4741) --- docs/docs/gatsby-starters.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/docs/gatsby-starters.md b/docs/docs/gatsby-starters.md index 634eaca9f126c..da37b8f95cc1b 100644 --- a/docs/docs/gatsby-starters.md +++ b/docs/docs/gatsby-starters.md @@ -560,3 +560,14 @@ Community: * [Bulma CSS Framework](https://bulma.io/) with its [Bloomer react components](https://bloomer.js.org/) * [Font-Awesome icons](https://fontawesome.com/icons) * Includes a simple fullscreen hero w/ footer example + +* [gatsby-starter-i18n-lingui](https://github.com/dcroitoru/gatsby-starter-i18n-lingui) + [(demo)](https://gatsby-starter-i18n-lingui.netlify.com/) + + Features: + + * Localization (Multilanguage) provided by [js-lingui](https://github.com/lingui/js-lingui) + * Message extraction + * Avoids code duplication - generates pages for each locale + * Possibility of translated paths +