mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-25 14:29:36 +01:00
Rename slug field
This commit is contained in:
parent
913da4453b
commit
fb5f9c89fc
@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "About me"
|
||||
slug: "/about"
|
||||
template: "page"
|
||||
slug: "/about"
|
||||
---
|
||||
|
||||
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Contact me"
|
||||
slug: "/contact"
|
||||
template: "page"
|
||||
slug: "/contacts"
|
||||
---
|
||||
|
||||
Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user