diff --git a/cms/cms.js b/cms/cms.js
index 3d63aeb..5da9f8e 100644
--- a/cms/cms.js
+++ b/cms/cms.js
@@ -4,8 +4,9 @@ import '../src/globalStyles.css'
import data from '../src/data.json'
import Home from '../src/views/Home'
import About from '../src/views/About'
-import SinglePost from '../src/views/SinglePost'
import Contact from '../src/views/Contact'
+import Blog from '../src/views/Blog'
+import SinglePost from '../src/views/SinglePost'
console.log('React version', React.version)
@@ -17,7 +18,10 @@ CMS.registerPreviewStyle('/admin/cms.bundle.css')
const getDocument = (collection, name) =>
data[collection] && data[collection].filter(page => page.name === name)[0]
+const getDocuments = (collection, name) => data[collection]
+
const globalSettings = getDocument('settings', 'global')
+const posts = getDocuments('posts')
// Preview Templates
CMS.registerPreviewTemplate('home-page', ({ entry }) => (
@@ -29,6 +33,9 @@ CMS.registerPreviewTemplate('about-page', ({ entry }) => (
CMS.registerPreviewTemplate('contact-page', ({ entry }) => (
))
+CMS.registerPreviewTemplate('blog-page', ({ entry }) => (
+
+))
CMS.registerPreviewTemplate('posts', ({ entry }) => (
))
diff --git a/content/pages/about.md b/content/pages/about.md
index 4da7686..0ba7e1a 100644
--- a/content/pages/about.md
+++ b/content/pages/about.md
@@ -1,9 +1,8 @@
---
title: About page title
-subtitle:
featuredImage: /images/uploads/tim-marshall-155597.jpg
section1: |-
- ## Hello World!
+ ## Lorem Ipsum
Netlify CMS works with both `.md` and `.json`.
@@ -15,10 +14,9 @@ section1: |-
-section2: >-
+section2: |-
## This is a Container component
-
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.
@@ -28,9 +26,7 @@ section2: >-
bibendum duis netus a consectetur dui magnis ac aliquet sem posuere tincidunt
vestibulum.
-
The image below will have a `srcset` attribute generated:
-

---
diff --git a/content/pages/blog.md b/content/pages/blog.md
new file mode 100644
index 0000000..21cb506
--- /dev/null
+++ b/content/pages/blog.md
@@ -0,0 +1,4 @@
+---
+title: Blog
+featuredImage: /images/uploads/ng-32703.jpg
+---
diff --git a/content/pages/contact.md b/content/pages/contact.md
index ac27925..7d3bb8e 100644
--- a/content/pages/contact.md
+++ b/content/pages/contact.md
@@ -1,13 +1,18 @@
---
-title: Contact
-subtitle:
+title: Contact us
+subtitle: ''
+featuredImage: '/images/uploads/mark-chang-74-3.jpg'
+address: 404 James St, Burleigh Heads QLD 4220
+phone: 0987 123 456
+email: example@example.com
---
+
# 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`
+* 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/).
diff --git a/content/pages/home.md b/content/pages/home.md
index 5cbdee2..c26c2f3 100644
--- a/content/pages/home.md
+++ b/content/pages/home.md
@@ -1,13 +1,10 @@
---
title: Hello World!
-subtitle:
+subtitle: This is the home page subtitle
+featuredImage: '/images/uploads/isabella juskova.jpg'
---
-# 🌶 Netlify CMS + React Starter
-
-[](http://standardjs.com/)
-[](https://github.com/prettier/prettier)
-[](https://david-dm.org/jinksi/netlify-cms-react-starter)
+# Netlify CMS + React Starter
A starter project for creating lightning-fast, offline-first websites with [Netlify CMS](https://netlifycms.org) and React.
@@ -17,50 +14,6 @@ A starter project for creating lightning-fast, offline-first websites with [Netl
* **[React Snapshot](https://github.com/geelen/react-snapshot)** for pre-rendering to static html so it works without Javascript ⭐️
* **[Netlify CMS](https://github.com/netlify/netlify-cms)** for content management
-I aim to include commonly used components and best-practices e.g. forms, settings,
tags, lazy-loading images, etc.
-
-## Get going
-
-[](https://app.netlify.com/start/deploy?repository=https://github.com/Jinksi/netlify-cms-react-starter)
-
-1. Hit the **Deploy to Netlify** button. This will:
-
- * Clone the repo into your Github account
- * Create you a new project on Netlify, build & deploy
-
-1. Once your Netlify project has been created, change a couple of settings:
-
- * Enable **Identity**
- * Change **Registration Preferences** to **Invite Only**
- * Enable **Git Gateway**
-
-1. Invite users (probably yourself) to enable admin access
- * Open the **Identity** tab and hit **Invite Users**
-
-## Developing
-
-1. Clone your repo to your local machine
-
-1. Install dependencies
-
- `yarn` or `npm install`
-
-1. Run the development server
-
- `yarn start` or `npm run start`
-
-If you are adding or editing content locally in the CMS, a couple of things to note:
-
-* Changes will be pushed to the remote repo.
-
-* You will be prompted to enter your site's url, this is necessary for Netlify Identity to manage user login. This is stored in `localStorage`, so you might have to empty your browser cache if you are switching projects but remaining on `localhost:3000`.
-
-## Editing CMS fields
-
-The Netlify CMS configuration is located in `public/admin/config.yml`. This is where you will configure the pages, fields, posts and settings that are editable by the CMS.
-
-Find out more in the [Netlify CMS Docs](https://www.netlifycms.org/docs/#configuration).
-
## See also
[Netlify CMS Docs](https://www.netlifycms.org/docs/)
diff --git a/content/postCategories/fluff.md b/content/postCategories/fluff.md
deleted file mode 100644
index 01303ba..0000000
--- a/content/postCategories/fluff.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: Fluff
----
-
diff --git a/content/postCategories/updates.md b/content/postCategories/updates.md
new file mode 100644
index 0000000..b411e21
--- /dev/null
+++ b/content/postCategories/updates.md
@@ -0,0 +1,3 @@
+---
+title: Updates
+---
diff --git a/content/posts/2018-05-25-testing-1-8-2.md b/content/posts/2018-05-25-testing-1-8-2.md
index 16e6727..1bcee19 100644
--- a/content/posts/2018-05-25-testing-1-8-2.md
+++ b/content/posts/2018-05-25-testing-1-8-2.md
@@ -1,8 +1,11 @@
---
-title: Testing 1.8.2
+title: Post Three
status: Published
date: '2018-05-25'
postFeaturedImage: /images/uploads/isabella juskova.jpg
-excerpt: Test
+excerpt: This is placeholder text that our web designers put here to make sure words appear properly on your website. This text is going to be replaced once the website is completed. You are currently reading text that is written in English, not any other language.
---
-Test
+
+This is placeholder text that our web designers put here to make sure words appear properly on your website. This text is going to be replaced once the website is completed. You are currently reading text that is written in English, not any other language.
+
+Be careful not to waste too much time reading placeholder text! This text isn’t going to remain here because it doesn't pertain to the website. This paragraph has been copied from a program that automatically generates paragraphs like this. It is useful for web designers to use placeholder text so they can easily see what different fonts look like on a realistic paragraph.
diff --git a/content/posts/post-two.md b/content/posts/post-two.md
index a9664e8..d2a9a7e 100644
--- a/content/posts/post-two.md
+++ b/content/posts/post-two.md
@@ -2,7 +2,7 @@
title: Post Two
status: Published
categories:
- - category: Fluff
+ - category: Updates
date: '2018-03-28'
postFeaturedImage: /images/uploads/vyouw5byhlc.jpeg
excerpt: This is an excerpt of Post Two
diff --git a/package.json b/package.json
index 94d2443..bd87178 100644
--- a/package.json
+++ b/package.json
@@ -37,11 +37,12 @@
"dom-form-serializer": "^1.0.7",
"intersection-observer": "^0.5.0",
"lodash": "^4.17.10",
+ "modern-normalize": "^0.4.0",
"moveto": "^1.7.1",
"netlify-identity-widget": "^1.2.0",
- "normalize.css": "^8.0.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
+ "react-feather": "^1.1.0",
"react-helmet": "^5.1.3",
"react-markdown": "3",
"react-router-dom": "^4.1.1",
diff --git a/public/admin/admin.css b/public/admin/admin.css
index 30e8c7f..eed5f78 100644
--- a/public/admin/admin.css
+++ b/public/admin/admin.css
@@ -53,7 +53,7 @@
/* Custom logo */
-/* .nc-githubAuthenticationPage-logo {
+.nc-githubAuthenticationPage-logo {
background-image: url(/images/logo.svg);
background-position: center;
background-repeat: no-repeat;
@@ -79,4 +79,4 @@
transform: translate(-50%, -50%);
width: auto;
text-indent: 0;
-} */
+}
diff --git a/public/admin/config.yml b/public/admin/config.yml
index 4daa8eb..10c0af9 100644
--- a/public/admin/config.yml
+++ b/public/admin/config.yml
@@ -1,7 +1,7 @@
# See https://github.com/netlify/netlify-cms/blob/master/example/config.yml
backend:
name: git-gateway
- branch: master # Branch to update (optional; defaults to master)
+ branch: 0.3.0 # Branch to update (optional; defaults to master)
# display_url: https://netlify-cms-react-starter.netlify.com # This url will display in the top-right of the CMS
media_folder: "public/images/uploads" # Media files will be stored in the repo under static/images/uploads
@@ -19,7 +19,7 @@ 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: Subtitle, name: subtitle, widget: markdown}
- {label: Body, name: body, widget: markdown}
- file: "content/pages/about.md"
@@ -27,7 +27,7 @@ collections: # A list of collections the CMS should be able to edit
name: "about-page"
fields:
- {label: Title, name: title, widget: string}
- - {label: Subtitle, name: subtitle, widget: string}
+ - {label: Subtitle, name: subtitle, widget: markdown}
- {label: Featured Image, name: featuredImage, widget: image}
- {label: Section 1, name: section1, widget: markdown}
- {label: Section 2, name: section2, widget: markdown}
@@ -37,8 +37,20 @@ collections: # A list of collections the CMS should be able to edit
name: "contact-page"
fields:
- {label: Title, name: title, widget: string}
- - {label: Subtitle, name: subtitle, widget: string}
+ - {label: Subtitle, name: subtitle, widget: markdown}
+ - {label: Featured Image, name: featuredImage, widget: image}
- {label: Body, name: body, widget: markdown}
+ - {label: Address, name: address, widget: text}
+ - {label: Phone, name: phone, widget: string}
+ - {label: Email Address, name: email, widget: string}
+
+ - file: "content/pages/blog.md"
+ label: "Blog Page"
+ name: "blog-page"
+ fields:
+ - {label: Title, name: title, widget: string}
+ - {label: Subtitle, name: subtitle, widget: markdown}
+ - {label: Featured Image, name: featuredImage, widget: image}
- name: posts
diff --git a/public/favicon.ico b/public/favicon.ico
index d6282f8..652c842 100644
Binary files a/public/favicon.ico and b/public/favicon.ico differ
diff --git a/public/images/logo.png b/public/images/logo.png
index 86b9fd4..d12b45e 100644
Binary files a/public/images/logo.png and b/public/images/logo.png differ
diff --git a/public/images/logo.svg b/public/images/logo.svg
index bfe61df..2bf969f 100644
--- a/public/images/logo.svg
+++ b/public/images/logo.svg
@@ -1 +1,6 @@
-
\ No newline at end of file
+
diff --git a/public/images/uploads/ng-32703.jpg b/public/images/uploads/ng-32703.jpg
new file mode 100644
index 0000000..6454149
Binary files /dev/null and b/public/images/uploads/ng-32703.jpg differ
diff --git a/public/index.html b/public/index.html
index 0a66ebc..27932d0 100644
--- a/public/index.html
+++ b/public/index.html
@@ -31,16 +31,16 @@
-->
+ // check for netlifyIdentity, redirect to admin if user is logging in
+if (window.localStorage && window.netlifyIdentity) {
+ netlifyIdentity.on('init', function(user) {
+ if (!user) {
+ netlifyIdentity.on('login', function() {
+ document.location.href = '/admin/'
+ })
+ }
+ })
+}
+