Skip to content

Commit

Permalink
Restore fileAbsolutePath to MarkdownRemark nodes fixes #4399 (#4400)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Mar 6, 2018
1 parent 194594e commit 25ad10d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/gatsby-transformer-remark/src/on-node-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ module.exports = async function onCreateNode(

markdownNode.excerpt = data.excerpt

// Add path to the markdown file path
if (node.internal.type === `File`) {
markdownNode.fileAbsolutePath = node.absolutePath
}

markdownNode.internal.contentDigest = crypto
.createHash(`md5`)
.update(JSON.stringify(markdownNode))
Expand Down

0 comments on commit 25ad10d

Please sign in to comment.