From f077b2135fec7f6caa042acc44a4d7198101dced Mon Sep 17 00:00:00 2001 From: hugurp Date: Fri, 16 Feb 2018 21:12:04 +0100 Subject: [PATCH] fix broken `path` dependency Following the guide I had an error with the `path`. It seems that requiring it at the top of the file solves the issue: `const path = require("path");` Is there something else I was missing? Cheers --- docs/docs/adding-tags-and-categories-to-blog-posts.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/adding-tags-and-categories-to-blog-posts.md b/docs/docs/adding-tags-and-categories-to-blog-posts.md index 733f0853443ee..7f2eaf09f83dd 100644 --- a/docs/docs/adding-tags-and-categories-to-blog-posts.md +++ b/docs/docs/adding-tags-and-categories-to-blog-posts.md @@ -157,6 +157,8 @@ export const pageQuery = graphql` Now we've got a template. Great! I'll assume you followed the tutorial for [Adding Markdown Pages](/docs/adding-tags-and-categories-to-blog-posts/) and provide a sample `createPages` that generates post pages as well as tag pages. In the site's `gatsby-node.js` file, include `lodash` (`const _ = require('lodash')`) and then make sure your [`createPages`](/docs/node-apis/#createPages) looks something like this: ```js +const path = require("path"); + exports.createPages = ({ boundActionCreators, graphql }) => { const { createPage } = boundActionCreators;