diff --git a/benchmarks/source-datocms/gatsby-config.js b/benchmarks/source-datocms/gatsby-config.js index dc5204cb87095..bb7c6fb9ca678 100644 --- a/benchmarks/source-datocms/gatsby-config.js +++ b/benchmarks/source-datocms/gatsby-config.js @@ -17,13 +17,13 @@ module.exports = { path: `${__dirname}/src/pages/`, }, }, - { + { resolve: `gatsby-source-datocms`, options: { apiToken: process.env.DATOCMS_API_TOKEN, previewMode: false, disableLiveReload: false, - apiUrl: 'https://site-api.datocms.com', + apiUrl: `https://site-api.datocms.com`, }, }, ], diff --git a/benchmarks/source-datocms/gatsby-node.js b/benchmarks/source-datocms/gatsby-node.js index e4ce6ac7d886e..75f590e92c7a0 100644 --- a/benchmarks/source-datocms/gatsby-node.js +++ b/benchmarks/source-datocms/gatsby-node.js @@ -3,8 +3,8 @@ const kebabCase = require(`lodash.kebabcase`) exports.onCreateNode = ({ actions, node }) => { const { createNodeField } = actions - if (node.internal.type === 'node__article') { - createNodeField({ node, name: "slug", value: kebabCase(node.title) }) + if (node.internal.type === `node__article`) { + createNodeField({ node, name: `slug`, value: kebabCase(node.title) }) } } @@ -16,7 +16,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => { articles: allDatoCmsArticle { nodes { id - path + slug } } } @@ -28,11 +28,11 @@ exports.createPages = async ({ actions, graphql, reporter }) => { result.data.articles.nodes.map(article => { createPage({ - path: article.path, + path: article.slug, component: require.resolve(`./src/templates/article.js`), context: { id: article.id, - } + }, }) }) } diff --git a/benchmarks/source-datocms/src/pages/index.js b/benchmarks/source-datocms/src/pages/index.js index 8ebf326b65ca4..3af11ea1d1c93 100644 --- a/benchmarks/source-datocms/src/pages/index.js +++ b/benchmarks/source-datocms/src/pages/index.js @@ -9,7 +9,7 @@ const Index = ({ data }) => {