Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rawMarkdownBody to Markdown node #5557

Merged
merged 6 commits into from
Jun 6, 2018
Next Next commit
Add rawMarkdownBody to node.internal
  • Loading branch information
alexluong committed May 26, 2018
commit d462e06affdebb03f738d6d2f3ffbebe910242f8
1 change: 1 addition & 0 deletions packages/gatsby-transformer-remark/src/on-node-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports = async function onCreateNode(
internal: {
content,
type: `MarkdownRemark`,
rawMarkdownBody: data.content,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be in internal, it should be property of markdownNode (similar to excerpt)

},
}

Expand Down
1 change: 1 addition & 0 deletions packages/gatsby/src/joi-schemas/joi.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const nodeSchema = Joi.object()
fieldOwners: Joi.array(),
content: Joi.string().allow(``),
description: Joi.string(),
rawMarkdownBody: Joi.string(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to change this schema for single plugin - as mentioned in previous comment, move new property out of internal and remove this schema change

}),
})
.unknown()