Integrate extra content and fields
This commit is contained in:
parent
85cce0a28f
commit
2caf96afbf
4 changed files with 18 additions and 19 deletions
|
|
@ -15,10 +15,21 @@ collections: # A list of collections the CMS should be able to edit
|
|||
name: "home-page"
|
||||
fields:
|
||||
- {label: Title, name: title, widget: string}
|
||||
- {label: Subtitle, name: subtitle, widget: string}
|
||||
- {label: Body, name: body, widget: markdown}
|
||||
- file: "content/pages/about.json"
|
||||
label: "About Page"
|
||||
name: "about-page"
|
||||
fields:
|
||||
- {label: Title, name: title, widget: string}
|
||||
- {label: Subtitle, name: subtitle, widget: string}
|
||||
- {label: Body, name: body, widget: markdown}
|
||||
- {label: Section 1, name: section1, widget: markdown}
|
||||
- {label: Section 2, name: section2, widget: markdown}
|
||||
- file: "content/pages/contact.json"
|
||||
label: "Contact Page"
|
||||
name: "contact-page"
|
||||
fields:
|
||||
- {label: Title, name: title, widget: string}
|
||||
- {label: Subtitle, name: subtitle, widget: string}
|
||||
- {label: Body, name: body, widget: markdown}
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@
|
|||
<title>Content Manager</title>
|
||||
|
||||
<!-- Include the styles for the Netlify CMS UI, after your own styles -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/netlify-cms@^0.5.0/dist/cms.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/netlify-cms@0.5.0/dist/cms.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- Include the script that builds the page and powers Netlify CMS -->
|
||||
<script src="https://unpkg.com/netlify-cms@^0.5.0/dist/cms.js"></script>
|
||||
<script src="https://unpkg.com/netlify-cms@0.5.0/dist/cms.js"></script>
|
||||
<script src="https://identity-js.netlify.com/v1/netlify-identity-widget.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import React from 'react'
|
||||
import Helmet from 'react-helmet'
|
||||
import Marked from 'react-markdown'
|
||||
|
||||
import Page from '../components/Page'
|
||||
import PageHeader from '../components/PageHeader'
|
||||
import { Container, Section } from '../components/common'
|
||||
|
|
@ -12,14 +14,12 @@ export default ({ page }) => (
|
|||
<PageHeader title={page.title} subtitle={page.subtitle} />
|
||||
<Section thin>
|
||||
<Container>
|
||||
<h1>Hello World!</h1>
|
||||
<p>A sem vel nec sodales mi vivamus senectus sed potenti a parturient nascetur tincidunt nisi pulvinar rhoncus a. Risus imperdiet taciti suspendisse facilisi a per metus cubilia varius a nostra adipiscing amet ultrices quisque ac mi a. Dictumst a ultrices mi a dignissim ad fermentum eget a nam et a blandit scelerisque. Taciti lorem tempor quam vestibulum dis habitasse vestibulum diam vel est ut proin dis auctor. Suscipit scelerisque orci magna interdum vel bibendum duis netus a consectetur dui magnis ac aliquet sem posuere tincidunt vestibulum.</p>
|
||||
<Marked source={page.section1} />
|
||||
</Container>
|
||||
</Section>
|
||||
<Section thin>
|
||||
<Container taCenter skinny>
|
||||
<h1>This is a skinny center-aligned {'<Container />'}</h1>
|
||||
<p>A sem vel nec sodales mi vivamus senectus sed potenti a parturient nascetur tincidunt nisi pulvinar rhoncus a. Risus imperdiet taciti suspendisse facilisi a per metus cubilia varius a nostra adipiscing amet ultrices quisque ac mi a. Dictumst a ultrices mi a dignissim ad fermentum eget a nam et a blandit scelerisque. Taciti lorem tempor quam vestibulum dis habitasse vestibulum diam vel est ut proin dis auctor. Suscipit scelerisque orci magna interdum vel bibendum duis netus a consectetur dui magnis ac aliquet sem posuere tincidunt vestibulum.</p>
|
||||
<Marked source={page.section2} />
|
||||
</Container>
|
||||
</Section>
|
||||
</Page>
|
||||
|
|
|
|||
|
|
@ -6,24 +6,12 @@ import NetlifyForm from '../components/NetlifyForm'
|
|||
import { Container, Section } from '../components/common'
|
||||
import Marked from 'react-markdown'
|
||||
|
||||
const content = `
|
||||
# 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/).
|
||||
`
|
||||
|
||||
export default ({ page }) => (
|
||||
<Page>
|
||||
<PageHeader title={page.title} subtitle='<Contact />' />
|
||||
<Section thin>
|
||||
<Container>
|
||||
<Marked source={content} />
|
||||
<Marked source={page.body} />
|
||||
<br />
|
||||
<h3>{'<NetlifyForm />'}</h3>
|
||||
<NetlifyForm />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue