mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-25 22:39:41 +01:00
Rename slug field
This commit is contained in:
parent
913da4453b
commit
fb5f9c89fc
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: "About me"
|
title: "About me"
|
||||||
slug: "/about"
|
|
||||||
template: "page"
|
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.
|
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"
|
title: "Contact me"
|
||||||
slug: "/contact"
|
|
||||||
template: "page"
|
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.
|
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);
|
fmImagesToRelative(node);
|
||||||
|
|
||||||
if (node.internal.type === 'MarkdownRemark') {
|
if (node.internal.type === 'MarkdownRemark') {
|
||||||
if (typeof node.frontmatter.path !== 'undefined') {
|
console.log(node.frontmatter);
|
||||||
|
if (typeof node.frontmatter.slug !== 'undefined') {
|
||||||
createNodeField({
|
createNodeField({
|
||||||
node,
|
node,
|
||||||
name: 'slug',
|
name: 'slug',
|
||||||
|
Loading…
Reference in New Issue
Block a user