Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split content dir #59

Merged
merged 5 commits into from Mar 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 17 additions & 1 deletion netlify.toml
Expand Up @@ -5,4 +5,20 @@
[build.environment]
YARN_VERSION = "1.10.1"
YARN_FLAGS = "--no-ignore-optional"
NODE_VERSION = "10.11.0"
NODE_VERSION = "10.11.0"

[[redirects]]
from = "/blog/20180*"
to = "/blog/2018/20180:splat"
status = 301
force = true
[[redirects]]
from = "/blog/20181*"
to = "/blog/2018/20180:splat"
status = 301
force = true
[[redirects]]
from = "/blog/20190*"
to = "/blog/2019/20190:splat"
status = 301
force = true
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -17,6 +17,7 @@
"gatsby-link": "^2.0.0",
"gatsby-mdx": "^0.4.0",
"gatsby-plugin-canonical-urls": "^2.0.10",
"gatsby-plugin-client-side-redirect": "^0.0.2",
"gatsby-plugin-debug-build": "^1.0.0",
"gatsby-plugin-feed": "^2.0.0",
"gatsby-plugin-netlify-cms": "^3.0.12",
Expand Down
61 changes: 30 additions & 31 deletions static/admin/config.yml
@@ -1,44 +1,43 @@
blog: &blog
create: true
slug: '{{year}}{{month}}{{day}}{{hour}}{{minute}}{{second}}-{{slug}}'
fields:
- label: Template Key
name: templateKey
widget: hidden
default: blog-post
- label: Title (slug)
name: title
widget: string
- label: Publish Date
name: date
widget: datetime
- label: Body
name: body
widget: markdown
- label: Tags
name: tags
widget: list

backend:
name: github
repo: terrierscript/snippet.terrierscript.com

# name: git-gateway
# branch: master
branch: move-dir
media_folder: contents/img
public_folder: /img
# publish_mode: editorial_workflow
slug:
encoding: "ascii"

collections:
- name: blog
label: Blog
folder: contents/pages/blog
create: true
# TODO: use Hsi
# slug: '{{year}}{{month}}{{day}}000000-{{slug}}'
slug: '{{year}}{{month}}{{day}}{{hour}}{{minute}}{{second}}-{{slug}}'
fields:
- label: Template Key
name: templateKey
widget: hidden
default: blog-post
- label: Title (slug)
name: title
widget: string
- label: Publish Date
name: date
widget: datetime
- label: Body
name: body
widget: markdown
- label: Tags
name: tags
widget: list
# - label: Path (slug)
# name: path
# widget: string
# default: null
- name: blog-2019
label: Blog2019
folder: contents/pages/blog/2019
<<: *blog
- name: blog-2018
label: Blog2018
folder: contents/pages/blog/2018
<<: *blog
- name: draft
label: draft
files:
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Expand Up @@ -6103,6 +6103,13 @@ gatsby-plugin-canonical-urls@^2.0.10:
dependencies:
"@babel/runtime" "^7.0.0"

gatsby-plugin-client-side-redirect@^0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/gatsby-plugin-client-side-redirect/-/gatsby-plugin-client-side-redirect-0.0.2.tgz#a1282138dd8e525903e86b9c86a4f9b2e14e26f7"
integrity sha512-SIWZnkP3ANvVK0fKPhdRlcvM1uzz8GtvPRlvjpuuVk6M1pAQ12MomI8dD5FddMdFROEBsbEyEIdtc/kW5vrIFg==
dependencies:
fs-extra "^7.0.0"

gatsby-plugin-debug-build@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/gatsby-plugin-debug-build/-/gatsby-plugin-debug-build-1.0.0.tgz#404f28d0f4b6f89cfe0235ebcda66f21d1487926"
Expand Down