Rename slug field

This commit is contained in:
alxshelepenok
2018-11-12 20:38:36 +03:00
parent 913da4453b
commit fb5f9c89fc
3 changed files with 5 additions and 4 deletions

View File

@@ -10,7 +10,8 @@ const onCreateNode = ({ node, actions, getNode }) => {
fmImagesToRelative(node);
if (node.internal.type === 'MarkdownRemark') {
if (typeof node.frontmatter.path !== 'undefined') {
console.log(node.frontmatter);
if (typeof node.frontmatter.slug !== 'undefined') {
createNodeField({
node,
name: 'slug',