Skip to content

Instantly share code, notes, and snippets.

@schalkneethling
Last active November 21, 2019 14:05
Show Gist options
  • Save schalkneethling/64849071d73d1bde90fa7de067060220 to your computer and use it in GitHub Desktop.
Save schalkneethling/64849071d73d1bde90fa7de067060220 to your computer and use it in GitHub Desktop.
Basic config.yml for NetlifyCMS
backend:
name: git-gateway
branch: netlify-published-content
media_folder: "static/images/uploads" # Media files will be stored in the repo under static/images/uploads
public_folder: "/images/uploads" # The src attribute for uploaded media will begin with /images/uploads
collections:
- name: "homepage" # Used in routes, e.g., /admin/collections/blog
label: "Homepage" # Used in the UI
folder: "content" # The path to the folder where the documents are stored
create: false # Allow users to create new documents in this collection
slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
fields: # The fields for each document, usually in front matter
- { label: "Title", name: "title", widget: "string" }
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Featured Image", name: "thumbnail", widget: "image" }
- { label: "Hero Heading", name: "HeroHeading", widget: "string" }
- { label: "Body", name: "body", widget: "markdown" }
title date HeroHeading
We make your world a safer place
2019-11-14 09:38:44 +0200
We make <span class='highlight'>your world</span> a safer place
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment