Add Netlify CMS to middleman

Tom Rutgers committed Aug 14, 2018
commit b4300444054aaa0a65e6ad9224b5c95eafb6d842
Showing 2 changed files with 43 additions and 0 deletions
source/admin/config.yml +30 -0
@@ @@ -0,0 +1,30 @@
+ backend:
+ name: git-gateway
+ branch: master
+
+ media_folder: source/images
+ public_folder: /images
+
+ #publish_mode: editorial_workflow #optional, enables publishing workflow
+
+ collections:
+ - name: "blog"
+ label: "Blog"
+ folder: "source/posts/"
+ create: true
+ slug: "{{year}}-{{month}}-{{day}}-{{title}}"
+ fields:
+ - {label: "Title", name: "title", widget: "string"}
+ - {label: "Publish Date", name: "date", widget: "datetime"}
+ - {label: "Description", name: "description", widget: "text"}
+ - {label: "Body", name: "body", widget: "markdown"}
+
+ - name: "pages"
+ label: "Pages"
+ files:
+ - file: "data/pages/about.yml"
+ label: "About"
+ name: "about"
+ fields:
+ - {label: "Title", name: "title", widget: "string"}
+ - {label: "Body", name: "body", widget: "markdown"}
\ No newline at end of file
source/admin/index.html +13 -0
@@ @@ -0,0 +1,13 @@
+ <!doctype html>
+ <html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <title>Netlify CMS</title>
+ <script script src="https://identity.netlify.com/v1/netlify-identity-widget.js" type="text/javascript"></script>>
+ </head>
+ <body>
+ <script script src="https://unpkg.com/netlify-cms@^2.0.6/dist/netlify-cms.js" type="text/javascript"></script>>
+ </body>
+ </html>