Add netlify CMS admin panel.

This commit is contained in:
Dillon Kearns 2019-09-28 09:50:41 -07:00
parent fb59a1f316
commit b1e910d654
2 changed files with 43 additions and 0 deletions

30
examples/docs/static/admin/config.yml vendored Normal file
View File

@ -0,0 +1,30 @@
backend:
name: git-gateway
media_folder: "images" # Folder where user uploaded files should go
public_folder: "images"
publish_mode: "editorial_workflow" # see https://www.netlifycms.org/docs/open-authoring/
collections: # A list of collections the CMS should be able to edit
- name: "post" # Used in routes, ie.: /admin/collections/:slug/edit
label: "Post" # Used in the UI, ie.: "New Post"
folder: "content/blog" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
fields: # The fields each document in this collection have
- { label: "Title", name: "title", widget: "string" }
- { label: "Publish Date", name: "published", widget: "date" }
- { label: "Intro Blurb", name: "description", widget: "text" }
- { label: "Image", name: "image", widget: "image", required: true }
- label: "Align Content"
name: "author"
widget: "select"
options: ["Dillon Kearns"]
default: "Dillon Kearns"
- { label: "Body", name: "body", widget: "markdown" }
- {
label: "Type",
name: "type",
widget: "hidden",
default: "blog",
required: false,
}

13
examples/docs/static/admin/index.html vendored Normal file
View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
</head>
<body>
<script src="https://identity-js.netlify.com/v1/netlify-identity-widget.js"></script>
<!-- Include the script that builds the page and powers Netlify CMS -->
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
</body>
</html>