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