mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-01-27 05:51:22 +01:00
Merge pull request #504 from rtveitch/add-netlify-preview-path-support
Add netlify preview path support
This commit is contained in:
commit
d4e55520d4
@ -3,7 +3,7 @@ title: Perfecting the Art of Perfection
|
|||||||
date: "2016-09-01T23:46:37.121Z"
|
date: "2016-09-01T23:46:37.121Z"
|
||||||
template: "post"
|
template: "post"
|
||||||
draft: false
|
draft: false
|
||||||
slug: "/posts/perfecting-the-art-of-perfection/"
|
slug: "perfecting-the-art-of-perfection"
|
||||||
category: "Design Inspiration"
|
category: "Design Inspiration"
|
||||||
tags:
|
tags:
|
||||||
- "Handwriting"
|
- "Handwriting"
|
||||||
|
@ -3,7 +3,7 @@ title: The Origins of Social Stationery Lettering
|
|||||||
date: "2016-12-01T22:40:32.169Z"
|
date: "2016-12-01T22:40:32.169Z"
|
||||||
template: "post"
|
template: "post"
|
||||||
draft: false
|
draft: false
|
||||||
slug: "/posts/the-origins-of-social-stationery-lettering"
|
slug: "the-origins-of-social-stationery-lettering"
|
||||||
category: "Design Culture"
|
category: "Design Culture"
|
||||||
description: "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante."
|
description: "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante."
|
||||||
socialImage: "/media/image-3.jpg"
|
socialImage: "/media/image-3.jpg"
|
||||||
|
@ -3,7 +3,7 @@ title: "A Brief History of Typography"
|
|||||||
date: "2016-02-02T22:40:32.169Z"
|
date: "2016-02-02T22:40:32.169Z"
|
||||||
template: "post"
|
template: "post"
|
||||||
draft: false
|
draft: false
|
||||||
slug: "/posts/a-brief-history-of-typography/"
|
slug: "a-brief-history-of-typography"
|
||||||
category: "Design Inspiration"
|
category: "Design Inspiration"
|
||||||
tags:
|
tags:
|
||||||
- "Linotype"
|
- "Linotype"
|
||||||
|
@ -3,7 +3,7 @@ title: "Johannes Gutenberg: The Birth of Movable Type"
|
|||||||
date: "2017-08-18T22:12:03.284Z"
|
date: "2017-08-18T22:12:03.284Z"
|
||||||
template: "post"
|
template: "post"
|
||||||
draft: false
|
draft: false
|
||||||
slug: "/posts/the-birth-of-movable-type/"
|
slug: "the-birth-of-movable-type"
|
||||||
category: "Typography"
|
category: "Typography"
|
||||||
tags:
|
tags:
|
||||||
- "Open source"
|
- "Open source"
|
||||||
|
@ -3,7 +3,7 @@ title: Humane Typography in the Digital Age
|
|||||||
date: "2017-08-19T22:40:32.169Z"
|
date: "2017-08-19T22:40:32.169Z"
|
||||||
template: "post"
|
template: "post"
|
||||||
draft: false
|
draft: false
|
||||||
slug: "/posts/humane-typography-in-the-digital-age/"
|
slug: "humane-typography-in-the-digital-age"
|
||||||
category: "Typography"
|
category: "Typography"
|
||||||
tags:
|
tags:
|
||||||
- "Design"
|
- "Design"
|
||||||
|
@ -8,10 +8,11 @@ const onCreateNode = ({ node, actions, getNode }) => {
|
|||||||
|
|
||||||
if (node.internal.type === 'MarkdownRemark') {
|
if (node.internal.type === 'MarkdownRemark') {
|
||||||
if (typeof node.frontmatter.slug !== 'undefined') {
|
if (typeof node.frontmatter.slug !== 'undefined') {
|
||||||
|
const dirname = getNode(node.parent).relativeDirectory;
|
||||||
createNodeField({
|
createNodeField({
|
||||||
node,
|
node,
|
||||||
name: 'slug',
|
name: 'slug',
|
||||||
value: node.frontmatter.slug
|
value: `/${dirname}/${node.frontmatter.slug}`
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const value = createFilePath({ node, getNode });
|
const value = createFilePath({ node, getNode });
|
||||||
|
@ -5,12 +5,17 @@ backend:
|
|||||||
media_folder: "static/media"
|
media_folder: "static/media"
|
||||||
public_folder: "/media"
|
public_folder: "/media"
|
||||||
|
|
||||||
|
# Uncomment to leverage Netlify CMS UI authoring flow
|
||||||
|
# see: https://www.netlifycms.org/docs/configuration-options/#publish-mode
|
||||||
|
# publish_mode: editorial_workflow
|
||||||
|
|
||||||
collections:
|
collections:
|
||||||
- name: "posts"
|
- name: "posts"
|
||||||
label: "Posts"
|
label: "Posts"
|
||||||
folder: "content/posts"
|
folder: "content/posts"
|
||||||
create: true
|
create: true
|
||||||
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
|
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
|
||||||
|
preview_path: "posts/{{fields.slug}}"
|
||||||
fields:
|
fields:
|
||||||
- {label: "Template", name: "template", widget: "hidden", default: "post"}
|
- {label: "Template", name: "template", widget: "hidden", default: "post"}
|
||||||
- {label: "Title", name: "title", widget: "string"}
|
- {label: "Title", name: "title", widget: "string"}
|
||||||
|
Loading…
Reference in New Issue
Block a user