From d19ec31bdcb560a84297d360f639be2d40d83b44 Mon Sep 17 00:00:00 2001 From: Shawn Erquhart Date: Fri, 19 Jan 2018 13:17:50 -0500 Subject: [PATCH 01/13] Bundle Netlify CMS styles (#3611) * define webpack loader.exclude with array for extensibility * generate separate CSS bundle for Netlify CMS plugin --- .../src/gatsby-node.js | 80 ++++++++++++++----- packages/gatsby/src/utils/webpack.config.js | 10 +-- 2 files changed, 63 insertions(+), 27 deletions(-) diff --git a/packages/gatsby-plugin-netlify-cms/src/gatsby-node.js b/packages/gatsby-plugin-netlify-cms/src/gatsby-node.js index 17f79b63f0c71..3e3f8a8518765 100644 --- a/packages/gatsby-plugin-netlify-cms/src/gatsby-node.js +++ b/packages/gatsby-plugin-netlify-cms/src/gatsby-node.js @@ -1,34 +1,70 @@ const HtmlWebpackPlugin = require(`html-webpack-plugin`) const HtmlWebpackIncludeAssetsPlugin = require(`html-webpack-include-assets-plugin`) +const ExtractTextPlugin = require(`extract-text-webpack-plugin`) + +function plugins(stage) { + const commonPlugins = [ + // Output /admin/index.html + new HtmlWebpackPlugin({ + title: `Content Manager`, + filename: `admin/index.html`, + chunks: [`cms`], + }), + + // Include the identity widget script in the html file + new HtmlWebpackIncludeAssetsPlugin({ + assets: [`https://identity.netlify.com/v1/netlify-identity-widget.js`], + append: false, + publicPath: false, + }), + ] -exports.modifyWebpackConfig = ( - { config, stage }, - { modulePath = `${__dirname}/cms.js` } -) => { switch (stage) { case `develop`: + return commonPlugins + case `build-javascript`: + return [...commonPlugins, new ExtractTextPlugin(`cms.css`)] + default: + return [] + } +} + +function module(config, stage) { + switch (stage) { case `build-javascript`: - config.merge({ - entry: { - cms: modulePath, - }, - plugins: [ - new HtmlWebpackPlugin({ - title: `Content Manager`, - filename: `admin/index.html`, - chunks: [`cms`], - }), - new HtmlWebpackIncludeAssetsPlugin({ - assets: [ - `https://identity.netlify.com/v1/netlify-identity-widget.js`, - ], - append: false, - publicPath: false, - }), - ], + // Exclude Netlify CMS styles from Gatsby CSS bundle. This relies on + // Gatsby using webpack-configurator for webpack config extension, and + // also on the target loader key being named "css" in Gatsby's webpack + // config. + config.loader(`css`, { + exclude: [/\/node_modules\/netlify-cms\//], + }) + + // Exclusively extract Netlify CMS styles to /cms.css (filename configured + // above with plugin instantiation). + config.loader(`cms-css`, { + test: /\.css$/, + include: [/\/node_modules\/netlify-cms\//], + loader: ExtractTextPlugin.extract([`css`]), }) return config default: return config } } + +exports.modifyWebpackConfig = ( + { config, stage }, + { modulePath = `${__dirname}/cms.js` } +) => { + config.merge({ + entry: { + cms: modulePath, + }, + plugins: plugins(stage), + }) + + module(config, stage) + + return config +} diff --git a/packages/gatsby/src/utils/webpack.config.js b/packages/gatsby/src/utils/webpack.config.js index 788b40a22a58c..bbbe3c862fc04 100644 --- a/packages/gatsby/src/utils/webpack.config.js +++ b/packages/gatsby/src/utils/webpack.config.js @@ -372,7 +372,7 @@ module.exports = async ( // Common config for every env. config.loader(`js`, { test: /\.jsx?$/, // Accept either .js or .jsx files. - exclude: /(node_modules|bower_components)/, + exclude: [/(node_modules|bower_components)/], loader: `babel`, query: babelConfig, }) @@ -409,7 +409,7 @@ module.exports = async ( case `develop`: config.loader(`css`, { test: /\.css$/, - exclude: /\.module\.css$/, + exclude: [/\.module\.css$/], loaders: [`style`, `css`, `postcss`], }) @@ -434,7 +434,7 @@ module.exports = async ( case `build-css`: config.loader(`css`, { test: /\.css$/, - exclude: /\.module\.css$/, + exclude: [/\.module\.css$/], loader: ExtractTextPlugin.extract([`css?minimize`, `postcss`]), }) @@ -464,7 +464,7 @@ module.exports = async ( config.loader(`css`, { test: /\.css$/, - exclude: /\.module\.css$/, + exclude: [/\.module\.css$/], loader: `null`, }) @@ -489,7 +489,7 @@ module.exports = async ( config.loader(`css`, { test: /\.css$/, - exclude: /\.module\.css$/, + exclude: [/\.module\.css$/], // loader: `null`, loader: ExtractTextPlugin.extract([`css`]), }) From 01022ababac93e7d27a0f292e1c987ccbc96b255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Poduszl=C3=B3?= Date: Fri, 19 Jan 2018 19:28:35 +0100 Subject: [PATCH 02/13] Fix images disappearing from rendered markdown files (#3612) * Fix images disappearing from rendered markdown files Fixes #3608 * Revert invalid indentation changes --- packages/gatsby-remark-images/src/index.js | 27 +++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/packages/gatsby-remark-images/src/index.js b/packages/gatsby-remark-images/src/index.js index 2384553001b01..3dfe2dceee606 100644 --- a/packages/gatsby-remark-images/src/index.js +++ b/packages/gatsby-remark-images/src/index.js @@ -141,14 +141,16 @@ module.exports = ( fileType !== `svg` ) { const rawHTML = await generateImagesAndUpdateNode(node, resolve) - // Replace the image node with an inline HTML node. - node.type = `html` - node.value = rawHTML - return resolve(node) - } else { - // Image isn't relative so there's nothing for us to do. - return resolve() + + if (rawHTML != null) { + // Replace the image node with an inline HTML node. + node.type = `html` + node.value = rawHTML + } } + + // Image isn't relative so there's nothing for us to do. + return resolve() }) ) ).then(markdownImageNodes => @@ -197,11 +199,14 @@ module.exports = ( formattedImgTag, resolve ) - // Replace the image string - thisImg.replaceWith(rawHTML) - } else { - return resolve() + + if (rawHTML != null) { + // Replace the image string + thisImg.replaceWith(rawHTML) + } } + + return resolve() } // Replace the image node with an inline HTML node. From 751d3cf5e3dadbd06daa59f87090b124ec3f5a76 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Fri, 19 Jan 2018 11:07:56 -0800 Subject: [PATCH 03/13] Revert "Enable filtering on linked nodes" (#3613) * Revert "Fix images disappearing from rendered markdown files (#3612)" This reverts commit 01022ababac93e7d27a0f292e1c987ccbc96b255. * Revert "Bundle Netlify CMS styles (#3611)" This reverts commit d19ec31bdcb560a84297d360f639be2d40d83b44. * Revert "Publish" This reverts commit 53f66a4648989e604340afb9afa59751ea08b38c. * Revert "Update comment" This reverts commit 2b22c2c437a74460d421c1803f2636d1a41cddc6. * Revert "Enable filtering on linked nodes (#3600)" This reverts commit 7120e5ad4337ac903a683da999c96c51a6029d44. --- .../infer-graphql-input-type-test.js | 29 ------------------- .../src/schema/infer-graphql-input-fields.js | 9 ++---- .../gatsby/src/schema/infer-graphql-type.js | 2 +- 3 files changed, 3 insertions(+), 37 deletions(-) diff --git a/packages/gatsby/src/schema/__tests__/infer-graphql-input-type-test.js b/packages/gatsby/src/schema/__tests__/infer-graphql-input-type-test.js index aac4e6c5dd031..dd11b0e4448d9 100644 --- a/packages/gatsby/src/schema/__tests__/infer-graphql-input-type-test.js +++ b/packages/gatsby/src/schema/__tests__/infer-graphql-input-type-test.js @@ -482,33 +482,4 @@ describe(`GraphQL Input args`, () => { expect(result).toMatchSnapshot() }) - - it(`filters on linked fields`, async () => { - const { store, getNodes } = require(`../../redux`) - const linkedNodeType = new GraphQLObjectType({ - name: `Bar`, - fields: { - id: { type: GraphQLString }, - }, - }) - let types = [{ name: `Bar`, nodeObjectType: linkedNodeType }] - - store.dispatch({ - type: `CREATE_NODE`, - payload: { id: `baz`, internal: { type: `Bar` } }, - }) - - let result = await queryResult( - [...getNodes(), { linked___NODE: `baz`, foo: `bar` }], - ` - { - allNode(filter: { linked: { id: { eq: "baz" } } }) { - edges { node { linked { id } } } - } - } - `, - { types } - ) - expect(result.data.allNode.edges[0].node.linked.id).toEqual(`baz`) - }) }) diff --git a/packages/gatsby/src/schema/infer-graphql-input-fields.js b/packages/gatsby/src/schema/infer-graphql-input-fields.js index 29bde30b78a55..fea138023e433 100644 --- a/packages/gatsby/src/schema/infer-graphql-input-fields.js +++ b/packages/gatsby/src/schema/infer-graphql-input-fields.js @@ -19,8 +19,6 @@ const { isEmptyObjectOrArray, } = require(`./data-tree-utils`) -const { findLinkedNode } = require(`./infer-graphql-type`) - import type { GraphQLInputFieldConfig, GraphQLInputFieldConfigMap, @@ -203,11 +201,8 @@ export function inferInputObjectStructureFromNodes({ // setting traversing up not try to automatically infer them. if (isRoot && EXCLUDE_KEYS[key]) return - // Infer input arguments for linked nodes - if (_.includes(key, `___NODE`)) { - value = findLinkedNode(value) - ;[key] = key.split(`___`) - } + // Input arguments on linked fields aren't currently supported + if (_.includes(key, `___NODE`)) return let field = inferGraphQLInputFields({ nodes, diff --git a/packages/gatsby/src/schema/infer-graphql-type.js b/packages/gatsby/src/schema/infer-graphql-type.js index 34b5bf75db102..22a400c24031d 100644 --- a/packages/gatsby/src/schema/infer-graphql-type.js +++ b/packages/gatsby/src/schema/infer-graphql-type.js @@ -252,7 +252,7 @@ function inferFromMapping( } } -export function findLinkedNode(value, linkedField, path) { +function findLinkedNode(value, linkedField, path) { let linkedNode // If the field doesn't link to the id, use that for searching. if (linkedField) { From 2fc1af222736da687a4aaf5bd80378a5cccaf4e3 Mon Sep 17 00:00:00 2001 From: Edgar Aroutiounian Date: Fri, 19 Jan 2018 15:43:49 -0800 Subject: [PATCH 04/13] Add yerevancoder (#3598) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c520f06d92d11..293278458a15c 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,8 @@ Websites built with Gatsby: * [Landing page of Put.io](https://put.io/) * [Ryan Wiemer's Portfolio](https://www.ryanwiemer.com) ([source](https://github.com/ryanwiemer/rw)) +* [yerevancoder](https://yerevancoder.com) + ([source](https://github.com/yerevancoder/yerevancoder.github.io)) ## Docs From cc468b029819ce2279e47f5d75f3ded9d0f07a1c Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Fri, 19 Jan 2018 11:39:31 -0800 Subject: [PATCH 05/13] Publish - gatsby-plugin-netlify-cms@1.0.3 - gatsby-remark-images@1.5.38 - gatsby@1.9.162 --- packages/gatsby-plugin-netlify-cms/package.json | 2 +- packages/gatsby-remark-images/package.json | 2 +- packages/gatsby/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/gatsby-plugin-netlify-cms/package.json b/packages/gatsby-plugin-netlify-cms/package.json index 1cb078e0160de..a1b31c61b6db0 100644 --- a/packages/gatsby-plugin-netlify-cms/package.json +++ b/packages/gatsby-plugin-netlify-cms/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-plugin-netlify-cms", - "version": "1.0.2", + "version": "1.0.3", "description": "A Gatsby plugin which generates the Netlify CMS single page app", "main": "index.js", "author": "Shawn Erquhart ", diff --git a/packages/gatsby-remark-images/package.json b/packages/gatsby-remark-images/package.json index 89837fcf2015f..19ed7bcd1057d 100644 --- a/packages/gatsby-remark-images/package.json +++ b/packages/gatsby-remark-images/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-remark-images", - "version": "1.5.37", + "version": "1.5.38", "description": "Processes images in markdown so they can be used in the production build.", "main": "index.js", "keywords": [ diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 1db1794cb7041..4a0ae2c29be94 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.161", + "version": "1.9.162", "author": "Kyle Mathews ", "bin": { "gatsby": "./dist/bin/gatsby.js" From bd7a4b0cfbc1e7001f33b0e08d14544e33f38b67 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Fri, 19 Jan 2018 17:13:48 -0800 Subject: [PATCH 06/13] Fix gatsby-remark-image (#3620) --- .../gatsby-remark-images/src/__tests__/index.js | 3 +-- packages/gatsby-remark-images/src/index.js | 16 +++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/gatsby-remark-images/src/__tests__/index.js b/packages/gatsby-remark-images/src/__tests__/index.js index 0a143d4249f1a..c1f231eb1cfa0 100644 --- a/packages/gatsby-remark-images/src/__tests__/index.js +++ b/packages/gatsby-remark-images/src/__tests__/index.js @@ -144,6 +144,5 @@ test(`it leaves non-relative HTML img tags alone`, async () => { `.trim() const nodes = await plugin(createPluginOptions(content, imagePath)) - - expect(nodes.length).toBe(0) + expect(nodes[0].value).toBe(content) }) diff --git a/packages/gatsby-remark-images/src/index.js b/packages/gatsby-remark-images/src/index.js index 3dfe2dceee606..7d064851ceab5 100644 --- a/packages/gatsby-remark-images/src/index.js +++ b/packages/gatsby-remark-images/src/index.js @@ -52,6 +52,7 @@ module.exports = ( } return null }) + if (!imageNode || !imageNode.absolutePath) { return resolve() } @@ -142,15 +143,16 @@ module.exports = ( ) { const rawHTML = await generateImagesAndUpdateNode(node, resolve) - if (rawHTML != null) { + if (rawHTML) { // Replace the image node with an inline HTML node. node.type = `html` node.value = rawHTML } + return resolve(node) + } else { + // Image isn't relative so there's nothing for us to do. + return resolve() } - - // Image isn't relative so there's nothing for us to do. - return resolve() }) ) ).then(markdownImageNodes => @@ -200,13 +202,13 @@ module.exports = ( resolve ) - if (rawHTML != null) { + if (rawHTML) { // Replace the image string thisImg.replaceWith(rawHTML) + } else { + return resolve() } } - - return resolve() } // Replace the image node with an inline HTML node. From 13ebe9398c1d7c8568029705d68bdc9ac22f8b0f Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Fri, 19 Jan 2018 17:17:27 -0800 Subject: [PATCH 07/13] Publish - gatsby-plugin-netlify-cms@1.0.4 - gatsby-remark-images@1.5.39 - gatsby@1.9.163 --- packages/gatsby-plugin-netlify-cms/package.json | 2 +- packages/gatsby-remark-images/package.json | 2 +- packages/gatsby/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/gatsby-plugin-netlify-cms/package.json b/packages/gatsby-plugin-netlify-cms/package.json index a1b31c61b6db0..3c871e5fc3dfc 100644 --- a/packages/gatsby-plugin-netlify-cms/package.json +++ b/packages/gatsby-plugin-netlify-cms/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-plugin-netlify-cms", - "version": "1.0.3", + "version": "1.0.4", "description": "A Gatsby plugin which generates the Netlify CMS single page app", "main": "index.js", "author": "Shawn Erquhart ", diff --git a/packages/gatsby-remark-images/package.json b/packages/gatsby-remark-images/package.json index 19ed7bcd1057d..80984f641bff3 100644 --- a/packages/gatsby-remark-images/package.json +++ b/packages/gatsby-remark-images/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-remark-images", - "version": "1.5.38", + "version": "1.5.39", "description": "Processes images in markdown so they can be used in the production build.", "main": "index.js", "keywords": [ diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 4a0ae2c29be94..04d47d6774cba 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.162", + "version": "1.9.163", "author": "Kyle Mathews ", "bin": { "gatsby": "./dist/bin/gatsby.js" From 1fcf4a53ac9d25a29f3e935bcd2b180767288b50 Mon Sep 17 00:00:00 2001 From: flmuel Date: Sat, 20 Jan 2018 02:27:00 +0100 Subject: [PATCH 08/13] WordPress Media Download Basic Auth Fix (#3614) * WordPress Media Download Basic Auth Fix * format --- .../index.md | 2 +- docs/docs/building-apps-with-gatsby.md | 2 +- docs/docs/gatsby-starters.md | 2 +- docs/docs/querying-with-graphql.md | 2 +- .../src/create-remote-file-node.js | 8 +++++--- packages/gatsby-source-wordpress/src/gatsby-node.js | 1 + packages/gatsby-source-wordpress/src/normalize.js | 9 ++++++++- www/src/html.js | 7 +++++-- 8 files changed, 23 insertions(+), 10 deletions(-) diff --git a/docs/blog/2018-01-18-how-boston-gov-used-gatsby-to-be-selected-as-an-amazon-hq2-candidate-city/index.md b/docs/blog/2018-01-18-how-boston-gov-used-gatsby-to-be-selected-as-an-amazon-hq2-candidate-city/index.md index e3d87f454fe9b..8348671cf9611 100644 --- a/docs/blog/2018-01-18-how-boston-gov-used-gatsby-to-be-selected-as-an-amazon-hq2-candidate-city/index.md +++ b/docs/blog/2018-01-18-how-boston-gov-used-gatsby-to-be-selected-as-an-amazon-hq2-candidate-city/index.md @@ -10,7 +10,7 @@ Today, the team and the city scored a huge victory when Amazon announced that Bo ![Amazon Boston homepage](./amazon-boston.jpg "Boston city") -When Amazon announced in September that it was looking to build a new headquarters, bringing 50,000 jobs and billions of investment to the chosen city, Boston’s city government jumped to throw their hat in the ring. +When Amazon announced in September that it was looking to build a new headquarters, bringing 50,000 jobs and billions of investment to the chosen city, Boston’s city government jumped to throw their hat in the ring. As a technology hub, the city wanted to put their best digital foot forward, so they turned to the Boston.gov team to build a website as the city’s application — [amazon.boston.gov](http://amazon.boston.gov) . diff --git a/docs/docs/building-apps-with-gatsby.md b/docs/docs/building-apps-with-gatsby.md index 414882e0986ef..a1f3196d8c2d7 100644 --- a/docs/docs/building-apps-with-gatsby.md +++ b/docs/docs/building-apps-with-gatsby.md @@ -2,7 +2,7 @@ title: "Building apps with Gatsby" --- -Gatsby can be used to create fully dynamic apps. The default Gatsby app is made up of statically rendered pages. On this foundation, you can build what we call "hybrid" sites which adds dynamically rendered sections of pages and if needed, client-only routes. +Gatsby can be used to create fully dynamic apps. The default Gatsby app is made up of statically rendered pages. On this foundation, you can build what we call "hybrid" sites which adds dynamically rendered sections of pages and if needed, client-only routes. ## Statically rendered pages diff --git a/docs/docs/gatsby-starters.md b/docs/docs/gatsby-starters.md index eb663998bd87c..4a1bfe315734c 100644 --- a/docs/docs/gatsby-starters.md +++ b/docs/docs/gatsby-starters.md @@ -80,7 +80,7 @@ Community: * Basic components: SiteNavi, SitePost, SitePage * [gatsby-blog-starter-kit](https://github.com/dschau/gatsby-blog-starter-kit) -[(demo)](https://dschau.github.io/gatsby-blog-starter-kit/) + [(demo)](https://dschau.github.io/gatsby-blog-starter-kit/) Features: diff --git a/docs/docs/querying-with-graphql.md b/docs/docs/querying-with-graphql.md index 2ce7d7dda74da..16aeb6c3479a7 100644 --- a/docs/docs/querying-with-graphql.md +++ b/docs/docs/querying-with-graphql.md @@ -22,7 +22,7 @@ the browser when needed by your components. ## Why is GraphQL so cool? * Eliminate frontend data boilerplate — no need to worry about requesting & waiting for data. Just ask for the data you need with a GraphQL query and it'll show up when you need it -* Push frontend complexity into queries — many data transformations can be done at *build-time* within your GraphQL queries +* Push frontend complexity into queries — many data transformations can be done at _build-time_ within your GraphQL queries * It's the perfect data querying language for the often complex/nested data dependencies of modern applications * Improve performance by removing data bloat — GraphQL is a big part of why Gatsby is so fast as it enables lazy-loading the exact data in the exact form each view needs diff --git a/packages/gatsby-source-filesystem/src/create-remote-file-node.js b/packages/gatsby-source-filesystem/src/create-remote-file-node.js index 09b077624d0d9..971252e766b4c 100644 --- a/packages/gatsby-source-filesystem/src/create-remote-file-node.js +++ b/packages/gatsby-source-filesystem/src/create-remote-file-node.js @@ -7,7 +7,7 @@ const { isWebUri } = require(`valid-url`) const { createFileNode } = require(`./create-file-node`) const cacheId = url => `create-remote-file-node-${url}` -module.exports = ({ url, store, cache, createNode }) => +module.exports = ({ url, store, cache, createNode, _auth }) => new Promise(async (resolve, reject) => { if (!url || isWebUri(url) === undefined) { resolve() @@ -26,7 +26,9 @@ module.exports = ({ url, store, cache, createNode }) => // See if there's response headers for this url // from a previous request. const cachedHeaders = await cache.get(cacheId(url)) - const headers = {} + const headers = { + auth: _auth.htaccess_user + `:` + _auth.htaccess_pass, + } if (cachedHeaders && cachedHeaders.etag) { headers[`If-None-Match`] = cachedHeaders.etag } @@ -53,7 +55,7 @@ module.exports = ({ url, store, cache, createNode }) => let statusCode let responseHeaders let responseError = false - const responseStream = got.stream(url, { headers }) + const responseStream = got.stream(url, headers) responseStream.pipe(fs.createWriteStream(tmpFilename)) responseStream.on(`downloadProgress`, pro => console.log(pro)) diff --git a/packages/gatsby-source-wordpress/src/gatsby-node.js b/packages/gatsby-source-wordpress/src/gatsby-node.js index 02f04284409ad..2d8baebbd2541 100644 --- a/packages/gatsby-source-wordpress/src/gatsby-node.js +++ b/packages/gatsby-source-wordpress/src/gatsby-node.js @@ -91,6 +91,7 @@ exports.sourceNodes = async ( store, cache, createNode, + _auth, }) // Search and replace Content Urls diff --git a/packages/gatsby-source-wordpress/src/normalize.js b/packages/gatsby-source-wordpress/src/normalize.js index 13266f47b636c..e1ad610f4af21 100644 --- a/packages/gatsby-source-wordpress/src/normalize.js +++ b/packages/gatsby-source-wordpress/src/normalize.js @@ -390,7 +390,13 @@ exports.mapEntitiesToMedia = entities => { } // Downloads media files and removes "sizes" data as useless in Gatsby context. -exports.downloadMediaFiles = async ({ entities, store, cache, createNode }) => +exports.downloadMediaFiles = async ({ + entities, + store, + cache, + createNode, + _auth, +}) => Promise.all( entities.map(async e => { let fileNode @@ -401,6 +407,7 @@ exports.downloadMediaFiles = async ({ entities, store, cache, createNode }) => store, cache, createNode, + _auth, }) } catch (e) { // Ignore diff --git a/www/src/html.js b/www/src/html.js index b8128d396e699..9b2df408abac2 100644 --- a/www/src/html.js +++ b/www/src/html.js @@ -72,7 +72,7 @@ export default class HTML extends React.Component { href={`/safari-pinned-tab.svg`} color="#5bbad5" /> - +