Update CMS content files & config

This commit is contained in:
Jinksi 2017-11-18 14:06:53 +10:00
parent e5664c497d
commit ab1f52711e
9 changed files with 24 additions and 17 deletions

View file

@ -1 +0,0 @@
{"title":"Contact","subtitle":"<Contact />","body":"# Example contact form\n\nThis form is setup to use Netlify's form handling:\n\n- the form action is set to the current absolute url: `action: '/contact/'`\n- a name attribute is sent with the form's data `'form-name': 'Contact'`\n- netlify data attributes are added to the form `data-netlify data-netlify-honeypot`\n\nFind out more in the [Netlify Docs](https://www.netlify.com/docs/form-handling/).\n"}

13
content/pages/contact.md Normal file
View file

@ -0,0 +1,13 @@
---
title: Contact
subtitle: <Contact />
---
# Example contact form
This form is setup to use Netlify's form handling:
- the form action is set to the current absolute url: `action: '/contact/'`
- a name attribute is sent with the form's data `'form-name': 'Contact'`
- netlify data attributes are added to the form `data-netlify data-netlify-honeypot`
Find out more in the [Netlify Docs](https://www.netlify.com/docs/form-handling/).

View file

@ -1 +0,0 @@
{"title":"Home","subtitle":"<Home />","body":"# 🍉 HyperStatic\n\nA not-so-static site boilerplate:\n\n* **Create React App** for simplicity\n* **Styled Components** for component-based css\n* **React Router** for routing (v4)\n* **React Helmet** for document titles, descriptions, meta\n* **React Snapshot** for pre-rendering to static html so it works without Javascript ⭐️\n* [**Netlify CMS**](https://netlifycms.org)"}

5
content/pages/home.md Normal file
View file

@ -0,0 +1,5 @@
---
title: Netlify CMS + React Starter
subtitle: <Home />
---
Hello World!

View file

@ -1,3 +0,0 @@
{
"siteTitle": "HyperStatic"
}

View file

@ -1,7 +1,7 @@
# See https://github.com/netlify/netlify-cms/blob/master/example/config.yml
backend:
name: git-gateway
branch: netlify-cms # Branch to update (optional; defaults to master)
branch: master # Branch to update (optional; defaults to master)
media_folder: "public/images/uploads" # Media files will be stored in the repo under static/images/uploads
public_folder: "/images/uploads" # The src attribute for uploaded media will begin with /images/uploads
@ -13,27 +13,21 @@ collections: # A list of collections the CMS should be able to edit
editor:
preview: false
files:
- file: "content/settings/global.json"
- file: "content/settings/global.yml"
label: "Global Settings"
name: "global-settings"
fields:
- {label: Site Title, name: siteTitle, widget: string}
- file: "content/settings/global-yaml.yml"
label: "Global Settings - Yaml"
name: "global-settings-yaml"
fields:
- {label: Site Title, name: siteTitle, widget: string}
- name: "pages"
label: "Pages"
files:
- file: "content/pages/home.json"
- file: "content/pages/home.md"
label: "Home Page"
name: "home-page"
fields:
- {label: Title, name: title, widget: string}
- {label: Subtitle, name: subtitle, widget: string}
- {label: Body, name: body, widget: markdown}
# markdown files are ok
- file: "content/pages/about.md"
label: "About Page"
name: "about-page"
@ -43,7 +37,7 @@ collections: # A list of collections the CMS should be able to edit
- {label: Featured Image, name: featuredImage, widget: image}
- {label: Section 1, name: section1, widget: markdown}
- {label: Section 2, name: section2, widget: markdown}
- file: "content/pages/contact.json"
- file: "content/pages/contact.md"
label: "Contact Page"
name: "contact-page"
fields:

View file

@ -12,7 +12,7 @@ export default ({ page, site }) => (
<PageHeader title={page.title} subtitle='<Contact />' />
<Section thin>
<Container>
<Marked source={page.body} />
<Marked source={page.content} />
<br />
<h3>{'<NetlifyControlledForm />'}</h3>
<NetlifyControlledForm />

View file

@ -12,7 +12,7 @@ export default ({ page }) => {
<PageHeader title={title} subtitle={subtitle} />
<Section thin>
<Container>
<Content source={page.body} />
<Content source={page.content} />
</Container>
</Section>
<Helmet>