mirror of
				https://github.com/mastermindzh/rickvanlieshout.com
				synced 2025-10-31 00:29:46 +01:00 
			
		
		
		
	Update on-create-node.js
This commit is contained in:
		| @@ -10,7 +10,6 @@ const onCreateNode = ({ node, actions, getNode }) => { | |||||||
|   fmImagesToRelative(node); |   fmImagesToRelative(node); | ||||||
|  |  | ||||||
|   if (node.internal.type === 'MarkdownRemark') { |   if (node.internal.type === 'MarkdownRemark') { | ||||||
|     console.log(node.frontmatter); |  | ||||||
|     if (typeof node.frontmatter.slug !== 'undefined') { |     if (typeof node.frontmatter.slug !== 'undefined') { | ||||||
|       createNodeField({ |       createNodeField({ | ||||||
|         node, |         node, | ||||||
| @@ -20,9 +19,9 @@ const onCreateNode = ({ node, actions, getNode }) => { | |||||||
|     } else { |     } else { | ||||||
|       const value = createFilePath({ node, getNode }); |       const value = createFilePath({ node, getNode }); | ||||||
|       createNodeField({ |       createNodeField({ | ||||||
|         name: 'slug', |  | ||||||
|         node, |         node, | ||||||
|         value, |         name: 'slug', | ||||||
|  |         value | ||||||
|       }); |       }); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user