page.body === page.content

This commit is contained in:
Eric Jinks 2018-05-01 15:38:46 +10:00
parent bc02be51e1
commit dc1350ed15
4 changed files with 6 additions and 5 deletions

View file

@ -56,6 +56,7 @@ const getFileContents = filePath => {
}
let documentData = JSON.parse(data)
documentData.name = getDocumentName(filePath)
documentData.body = documentData.body || documentData.content
let obj = {}
_set(obj, getCollectionType(filePath), [documentData])
console.log(`✨ Processed ${filePath}`)

View file

@ -13,7 +13,7 @@ export default ({ page, siteTitle }) => (
<PageHeader title={page.title} subtitle='<Contact />' />
<div className='section thin'>
<div className='container'>
<Content source={page.content} />
<Content source={page.body} />
<h3>{'<EnquiryFormSimple />'}</h3>
<EnquiryFormSimple name='Simple Form' />
<br />

View file

@ -6,13 +6,13 @@ import PageHeader from '../components/PageHeader'
import './Home.css'
export default ({ page }) => {
const { title, subtitle } = page
const { title, subtitle, body } = page
return (
<main className='Home'>
<PageHeader title={title} subtitle={subtitle} />
<div className='section thin'>
<div className='container'>
<Content source={page.content} />
<Content source={body} />
</div>
</div>
<Helmet>

View file

@ -9,7 +9,7 @@ import { dateFormatted } from '../util/date'
import './SinglePost.css'
export default ({ singlePost, nextPostURL, prevPostURL }) => {
const { content, categories, postFeaturedImage, title, date } = singlePost
const { body, categories, postFeaturedImage, title, date } = singlePost
return (
<article className='SinglePost section light'>
<Helmet>
@ -42,7 +42,7 @@ export default ({ singlePost, nextPostURL, prevPostURL }) => {
{title && <h1 className='SinglePost--Title'>{title}</h1>}
<div className='SinglePost--InnerContent'>
<Content source={content} />
<Content source={body} />
</div>
<div className='SinglePost--Pagination Flex alignStretch justifyBetween flexWrap'>