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