forked from danurbanowicz/eleventy-netlify-boilerplate
/
config.yml
60 lines (57 loc) · 2.35 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
backend:
name: git-gateway
branch: authors # Branch to update (optional; defaults to master)
# Uncomment below to enable drafts
# publish_mode: editorial_workflow
media_folder: "static/img" # Media files will be stored in the repo under images/uploads
collections:
# Our blog posts
- name: "blog" # Used in routes, e.g., /admin/collections/blog
label: "Post" # Used in the UI
folder: "posts" # The path to the folder where the documents are stored
create: true # 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" }
# Authors (listed in _data/authors.json)
- name: "author"
label: "Post Author"
widget: "relation"
collection: "authors"
searchFields: "name"
valueField: "name"
displayFields: "name"
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Summary", name: "summary", widget: "text" }
- { label: "Tags", name: "tags", widget: "list", default: ["post"] }
- { label: "Body", name: "body", widget: "markdown" }
# Our pages e.g. About
- name: "pages"
label: "Page"
folder: "pages"
create: false # Change to true to allow editors to create new pages
slug: "{{slug}}"
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Permalink", name: "permalink", widget: "string" }
- label: "Navigation" # https://www.11ty.dev/docs/plugins/navigation/
name: "eleventyNavigation"
widget: "object"
fields:
- { label: "Key", name: "key", widget: "string" }
- { label: "Order", name: "order", widget: "number", default: 0 }
- { label: "Body", name: "body", widget: "markdown" }
# Authors (listed in _data/authors.json)
- name: "authors"
label: "Post Authors"
collection: "authors"
files: "_data/authors.json"
fields:
- label: "Author"
name: "author"
widget: "list"
fields:
- {label: "Name", name: "name", widget: "string"}
- {label: "Email", name: "email", widget: "string"}
- {label: "Github", name: "github", widget: "string"}