Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Commit

Permalink
add netlifycms
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinchernev committed Aug 13, 2017
1 parent c2b1bd4 commit 91f8009
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/pages/admin.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React, { Component } from "react";
import Helmet from "react-helmet";

class AdminPage extends Component {
render() {
return (
<div className="admin">
<Helmet>
<meta charSet="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<title>Content Manager</title>

<link
rel="stylesheet"
href="https://unpkg.com/netlify-cms@~0.4/dist/cms.css"
/>
<script src="https://unpkg.com/netlify-cms@~0.4/dist/cms.js" />
</Helmet>
</div>
);
}
}

export default AdminPage;
19 changes: 19 additions & 0 deletions static/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
backend:
name: github
repo: kalinchernev/gatsby-jammin # Path to your Github repository
branch: master # Branch to update (master by default)

media_folder: "static/img" # Folder where user uploaded files should go

collections: # A list of collections the CMS should be able to edit
- name: "post" # Used in routes, ie.: /admin/collections/:slug/edit
label: "Post" # Used in the UI, ie.: "New Post"
folder: "content" # The path to the folder where the documents are stored
sort: "date:desc" # Default is title:asc
create: true # Allow users to create new documents in this collection
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
fields: # The fields each document in this collection have
- {label: "Title", name: "title", widget: "string", tagname: "h1"}
- {label: "Body", name: "body", widget: "markdown"}
meta: # Meta data fields. Just like fields, but without any preview element
- {label: "Publish Date", name: "date", widget: "datetime", format: "YYYY-MM-DD hh:mm:ss"}

0 comments on commit 91f8009

Please sign in to comment.