Initial commit
This commit is contained in:
56
example/config.yml
Normal file
56
example/config.yml
Normal file
@ -0,0 +1,56 @@
|
||||
backend:
|
||||
name: test-repo
|
||||
delay: 0.1
|
||||
|
||||
media_folder: "assets/uploads"
|
||||
|
||||
collections: # A list of collections the CMS should be able to edit
|
||||
- name: "posts" # Used in routes, ie.: /admin/collections/:slug/edit
|
||||
label: "Post" # Used in the UI, ie.: "New Post"
|
||||
folder: "_posts"
|
||||
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
|
||||
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", tagname: "h1"}
|
||||
- {label: "Cover Image", name: "image", widget: "image", optional: true, tagname: ""}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
meta:
|
||||
- {label: "Publish Date", name: "date", widget: "datetime", format: "YYYY-MM-DD hh:mma"}
|
||||
- {label: "SEO Description", name: "description", widget: "text"}
|
||||
|
||||
- name: "faq" # Used in routes, ie.: /admin/collections/:slug/edit
|
||||
label: "FAQ" # Used in the UI, ie.: "New Post"
|
||||
folder: "_faqs"
|
||||
create: true # Allow users to create new documents in this collection
|
||||
fields: # The fields each document in this collection have
|
||||
- {label: "Question", name: "title", widget: "string", tagname: "h1"}
|
||||
- {label: "Answer", name: "body", widget: "markdown"}
|
||||
|
||||
- name: "settings"
|
||||
label: "Settings"
|
||||
files:
|
||||
- name: "general"
|
||||
label: "Site Settings"
|
||||
file: "_data/settings.json"
|
||||
description: "General Site Settings"
|
||||
fields:
|
||||
- {label: "Global title", name: site_title, widget: "string"}
|
||||
- label: "Post Settings"
|
||||
name: posts
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Number of posts on frontpage", name: front_limit, widget: number}
|
||||
- {label: "Default Author", name: author, widget: string}
|
||||
- {label: "Default Thumbnail", name: thumb, widget: image, class: "thumb"}
|
||||
|
||||
- name: "authors"
|
||||
label: "Authors"
|
||||
file: "_data/authors.yml"
|
||||
description: "Author descriptions"
|
||||
fields:
|
||||
- name: authors
|
||||
label: Authors
|
||||
widget: list
|
||||
fields:
|
||||
- {label: "Name", name: "name", widget: "string"}
|
||||
- {label: "Description", name: "description", widget: "markdown"}
|
10
example/index.html
Normal file
10
example/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>This is an example</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script src='/cms.js'></script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user