Prepare homepage hero in cms config

Tom Rutgers committed Aug 17, 2018
commit 89c7542a11026cc96249915afde96fc7bb0f55b9
Showing 3 changed files with 32 additions and 22 deletions
data/pages/about.yml +0 -4
@@ @@ -1,4 +0,0 @@
- title: About
- usps:
- - name: Shade-grown coffee
- description: Coffee is a small tree or shrub that grows in the forest understory in its wild form, and traditionally was grown commercially under other trees that provided shade. The forest-like structure of shade coffee farms provides habitat for a great number of migratory and resident species.
data/pages/home.yml +3 -0
@@ @@ -0,0 +1,3 @@
+ hero:
+ title: Great coffee with a conscience
+ image: img/uploads/homepage-hero.jpg
source/admin/config.yml +29 -18
@@ @@ -8,28 +8,39 @@ public_folder: /images/uploads
#publish_mode: editorial_workflow #optional, enables publishing workflow
collections:
- - name: "blog"
- label: "Blog"
- folder: "source/posts/"
+ - name: blog
+ label: Blog
+ folder: source/posts/
create: true
- slug: "{{year}}-{{month}}-{{day}}-{{title}}"
+ 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"}
+ - {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"
+ - name: pages
+ label: Pages
files:
- - file: "data/pages/about.yml"
- label: "About"
- name: "about"
+ - file: data/pages/about.yml
+ label: About
+ name: about
fields:
- - {label: "Title", name: "title", widget: string}
- - label: "Unique selling points"
- name: "usps"
- widget: "list"
+ - {label: Title, name: title, widget: string}
+ - label: Unique selling points
+ name: usps
+ widget: list
fields:
- {label: Name, name: name, widget: string}
- - {label: Description, name: description, widget: string}
\ No newline at end of file
+ - {label: Description, name: description, widget: string}
+
+ - file: "data/pages/home.yml"
+ label: Homepage
+ name: home
+ fields:
+ - label: Hero
+ name: hero
+ widget: object
+ fields:
+ - {label: Title, name: title, widget: title}
+ - {label: Image, name: image, widget: image}
\ No newline at end of file