Skip to content

Instantly share code, notes, and snippets.

@maciejmatu
Created May 3, 2018 17:50
Show Gist options
  • Save maciejmatu/987563ede550e7b9f1644cd01882e6f5 to your computer and use it in GitHub Desktop.
Save maciejmatu/987563ede550e7b9f1644cd01882e6f5 to your computer and use it in GitHub Desktop.
Example netlify-cms config.yml file, I used for my 'smoothielicious' project.
backend:
name: git-gateway
branch: master
media_folder: static/img
public_folder: /img
collections:
- name: "blog"
label: "Blog"
label_singular: "Post"
folder: "src/pages/blog"
create: true
fields:
- {label: "Template Key", name: "templateKey", widget: "hidden", default: "blog-post.template"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Body", name: "body", widget: "markdown"}
- name: "products"
label: "Products"
label_singular: "Product"
folder: "src/pages/products"
create: true
fields:
- {label: "Template Key", name: "templateKey", widget: "hidden", default: "product-page.template"}
- {label: "Name", name: "title", widget: "string"}
- {label: "Image", name: "image", widget: "image"}
- {label: "Description", name: "description", widget: "string"}
- {label: "Ingredients", name: "ingredients", widget: "list"}
- name: "pages"
label: "Pages"
files:
- file: "src/pages/about/index.md"
label: "About"
name: "about"
fields:
- {label: "Template Key", name: "templateKey", widget: "hidden", default: "about-page.template"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}
- file: "src/pages/index.md"
label: "Home"
name: "home"
fields:
- {label: "Template Key", name: "templateKey", widget: "hidden", default: "index-page.template"}
- {label: "Smoothies Section Heading", name: "smoothiesHeading", widget: "string"}
- {label: "Posts Section Heading", name: "postsHeading", widget: "string"}
- {label: "Contact Section Heading", name: "contactHeading", widget: "string"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment