mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-25 22:39:41 +01:00
Change frontmatter fields
This commit is contained in:
parent
de05e137ba
commit
440d4e88c7
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: "About me"
|
title: "About me"
|
||||||
layout: page
|
slug: "/about"
|
||||||
path: "/about"
|
template: "page"
|
||||||
---
|
---
|
||||||
|
|
||||||
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.
|
Before Width: | Height: | Size: 721 KiB After Width: | Height: | Size: 721 KiB |
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: "Contact me"
|
title: "Contact me"
|
||||||
layout: page
|
slug: "/contact"
|
||||||
path: "/contact"
|
template: "page"
|
||||||
---
|
---
|
||||||
|
|
||||||
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.
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
title: Perfecting the Art of Perfection
|
title: Perfecting the Art of Perfection
|
||||||
date: "2016-09-01T23:46:37.121Z"
|
date: "2016-09-01T23:46:37.121Z"
|
||||||
layout: post
|
template: "post"
|
||||||
draft: false
|
draft: false
|
||||||
path: "/posts/perfecting-the-art-of-perfection/"
|
slug: "/posts/perfecting-the-art-of-perfection/"
|
||||||
category: "Design Inspiration"
|
category: "Design Inspiration"
|
||||||
tags:
|
tags:
|
||||||
- "Handwriting"
|
- "Handwriting"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
title: The Origins of Social Stationery Lettering
|
title: The Origins of Social Stationery Lettering
|
||||||
date: "2016-12-01T22:40:32.169Z"
|
date: "2016-12-01T22:40:32.169Z"
|
||||||
layout: post
|
template: "post"
|
||||||
draft: false
|
draft: false
|
||||||
path: "/posts/the-origins-of-social-stationery-lettering"
|
slug: "/posts/the-origins-of-social-stationery-lettering"
|
||||||
category: "Design Culture"
|
category: "Design Culture"
|
||||||
tags:
|
tags:
|
||||||
- "Typefaces"
|
- "Typefaces"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
title: "A Brief History of Typography"
|
title: "A Brief History of Typography"
|
||||||
date: "2016-02-02T22:40:32.169Z"
|
date: "2016-02-02T22:40:32.169Z"
|
||||||
layout: post
|
template: "post"
|
||||||
draft: false
|
draft: false
|
||||||
path: "/posts/a-brief-history-of-typography/"
|
slug: "/posts/a-brief-history-of-typography/"
|
||||||
category: "Design Inspiration"
|
category: "Design Inspiration"
|
||||||
tags:
|
tags:
|
||||||
- "Linotype"
|
- "Linotype"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
title: "Johannes Gutenberg: The Birth of Movable Type"
|
title: "Johannes Gutenberg: The Birth of Movable Type"
|
||||||
date: "2017-08-18T22:12:03.284Z"
|
date: "2017-08-18T22:12:03.284Z"
|
||||||
layout: post
|
template: "post"
|
||||||
draft: false
|
draft: false
|
||||||
path: "/posts/the-birth-of-movable-type/"
|
slug: "/posts/the-birth-of-movable-type/"
|
||||||
category: "Typography"
|
category: "Typography"
|
||||||
tags:
|
tags:
|
||||||
- "Open source"
|
- "Open source"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
title: Humane Typography in the Digital Age
|
title: Humane Typography in the Digital Age
|
||||||
date: "2017-08-19T22:40:32.169Z"
|
date: "2017-08-19T22:40:32.169Z"
|
||||||
layout: post
|
template: "post"
|
||||||
draft: false
|
draft: false
|
||||||
path: "/posts/humane-typography-in-the-digital-age/"
|
slug: "/posts/humane-typography-in-the-digital-age/"
|
||||||
category: "Typography"
|
category: "Typography"
|
||||||
tags:
|
tags:
|
||||||
- "Design"
|
- "Design"
|
||||||
|
@ -36,7 +36,7 @@ const createPages = async ({ graphql, actions }) => {
|
|||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
frontmatter {
|
frontmatter {
|
||||||
layout
|
template
|
||||||
}
|
}
|
||||||
fields {
|
fields {
|
||||||
slug
|
slug
|
||||||
@ -50,13 +50,13 @@ const createPages = async ({ graphql, actions }) => {
|
|||||||
const { edges } = result.data.allMarkdownRemark;
|
const { edges } = result.data.allMarkdownRemark;
|
||||||
|
|
||||||
_.each(edges, (edge) => {
|
_.each(edges, (edge) => {
|
||||||
if (_.get(edge, 'node.frontmatter.layout') === 'page') {
|
if (_.get(edge, 'node.frontmatter.template') === 'page') {
|
||||||
createPage({
|
createPage({
|
||||||
path: edge.node.fields.slug,
|
path: edge.node.fields.slug,
|
||||||
component: path.resolve('./src/templates/page-template.js'),
|
component: path.resolve('./src/templates/page-template.js'),
|
||||||
context: { slug: edge.node.fields.slug }
|
context: { slug: edge.node.fields.slug }
|
||||||
});
|
});
|
||||||
} else if (_.get(edge, 'node.frontmatter.layout') === 'post') {
|
} else if (_.get(edge, 'node.frontmatter.template') === 'post') {
|
||||||
createPage({
|
createPage({
|
||||||
path: edge.node.fields.slug,
|
path: edge.node.fields.slug,
|
||||||
component: path.resolve('./src/templates/post-template.js'),
|
component: path.resolve('./src/templates/post-template.js'),
|
||||||
|
@ -14,7 +14,7 @@ const onCreateNode = ({ node, actions, getNode }) => {
|
|||||||
createNodeField({
|
createNodeField({
|
||||||
node,
|
node,
|
||||||
name: 'slug',
|
name: 'slug',
|
||||||
value: node.frontmatter.path
|
value: node.frontmatter.slug
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const value = createFilePath({ node, getNode });
|
const value = createFilePath({ node, getNode });
|
||||||
|
@ -11,7 +11,7 @@ module.exports = async (graphql, actions) => {
|
|||||||
const result = await graphql(`
|
const result = await graphql(`
|
||||||
{
|
{
|
||||||
allMarkdownRemark(
|
allMarkdownRemark(
|
||||||
filter: { frontmatter: { layout: { eq: "post" }, draft: { ne: true } } }
|
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
|
||||||
) {
|
) {
|
||||||
group(field: frontmatter___category) {
|
group(field: frontmatter___category) {
|
||||||
fieldValue
|
fieldValue
|
||||||
|
@ -9,7 +9,7 @@ module.exports = async (graphql, actions) => {
|
|||||||
const result = await graphql(`
|
const result = await graphql(`
|
||||||
{
|
{
|
||||||
allMarkdownRemark(
|
allMarkdownRemark(
|
||||||
filter: { frontmatter: { layout: { eq: "post" }, draft: { ne: true } } }
|
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
|
||||||
) { totalCount }
|
) { totalCount }
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
|
@ -11,7 +11,7 @@ module.exports = async (graphql, actions) => {
|
|||||||
const result = await graphql(`
|
const result = await graphql(`
|
||||||
{
|
{
|
||||||
allMarkdownRemark(
|
allMarkdownRemark(
|
||||||
filter: { frontmatter: { layout: { eq: "post" }, draft: { ne: true } } }
|
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
|
||||||
) {
|
) {
|
||||||
group(field: frontmatter___tags) {
|
group(field: frontmatter___tags) {
|
||||||
fieldValue
|
fieldValue
|
||||||
|
@ -40,7 +40,7 @@ export const query = graphql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
allMarkdownRemark(
|
allMarkdownRemark(
|
||||||
filter: { frontmatter: { layout: { eq: "post" }, draft: { ne: true } } }
|
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
|
||||||
) {
|
) {
|
||||||
group(field: frontmatter___category) {
|
group(field: frontmatter___category) {
|
||||||
fieldValue
|
fieldValue
|
||||||
|
@ -51,7 +51,7 @@ export const query = graphql`
|
|||||||
allMarkdownRemark(
|
allMarkdownRemark(
|
||||||
limit: $postsLimit,
|
limit: $postsLimit,
|
||||||
skip: $postsOffset,
|
skip: $postsOffset,
|
||||||
filter: { frontmatter: { category: { eq: $category }, layout: { eq: "post" }, draft: { ne: true } } },
|
filter: { frontmatter: { category: { eq: $category }, template: { eq: "post" }, draft: { ne: true } } },
|
||||||
sort: { order: DESC, fields: [frontmatter___date] }
|
sort: { order: DESC, fields: [frontmatter___date] }
|
||||||
){
|
){
|
||||||
edges {
|
edges {
|
||||||
|
@ -50,7 +50,7 @@ export const query = graphql`
|
|||||||
allMarkdownRemark(
|
allMarkdownRemark(
|
||||||
limit: $postsLimit,
|
limit: $postsLimit,
|
||||||
skip: $postsOffset,
|
skip: $postsOffset,
|
||||||
filter: { frontmatter: { layout: { eq: "post" }, draft: { ne: true } } },
|
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } },
|
||||||
sort: { order: DESC, fields: [frontmatter___date] }
|
sort: { order: DESC, fields: [frontmatter___date] }
|
||||||
){
|
){
|
||||||
edges {
|
edges {
|
||||||
|
@ -51,7 +51,7 @@ export const query = graphql`
|
|||||||
allMarkdownRemark(
|
allMarkdownRemark(
|
||||||
limit: $postsLimit,
|
limit: $postsLimit,
|
||||||
skip: $postsOffset,
|
skip: $postsOffset,
|
||||||
filter: { frontmatter: { tags: { in: [$tag] }, layout: { eq: "post" }, draft: { ne: true } } },
|
filter: { frontmatter: { tags: { in: [$tag] }, template: { eq: "post" }, draft: { ne: true } } },
|
||||||
sort: { order: DESC, fields: [frontmatter___date] }
|
sort: { order: DESC, fields: [frontmatter___date] }
|
||||||
){
|
){
|
||||||
edges {
|
edges {
|
||||||
|
@ -39,7 +39,7 @@ export const query = graphql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
allMarkdownRemark(
|
allMarkdownRemark(
|
||||||
filter: { frontmatter: { layout: { eq: "post" }, draft: { ne: true } } }
|
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
|
||||||
) {
|
) {
|
||||||
group(field: frontmatter___tags) {
|
group(field: frontmatter___tags) {
|
||||||
fieldValue
|
fieldValue
|
||||||
|
Loading…
Reference in New Issue
Block a user