-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! feat: add initial workflow status in config
- Loading branch information
1 parent
049c87a
commit 78cc7e0
Showing
6 changed files
with
134 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
backend: | ||
name: git-gateway | ||
branch: master | ||
|
||
publish_mode: editorial_workflow | ||
default_workflow_status: pending_publish | ||
media_folder: static/media | ||
public_folder: /media | ||
collections: | ||
- name: posts | ||
label: Posts | ||
label_singular: 'Post' | ||
folder: content/posts | ||
create: true | ||
slug: '{{year}}-{{month}}-{{day}}-{{slug}}' | ||
fields: | ||
- label: Template | ||
name: template | ||
widget: hidden | ||
default: post | ||
- label: Title | ||
name: title | ||
widget: string | ||
- label: 'Cover Image' | ||
name: 'image' | ||
widget: 'image' | ||
required: false | ||
- label: Publish Date | ||
name: date | ||
widget: datetime | ||
- label: Description | ||
name: description | ||
widget: text | ||
- label: Category | ||
name: category | ||
widget: string | ||
- label: Body | ||
name: body | ||
widget: markdown | ||
- label: Tags | ||
name: tags | ||
widget: list | ||
- name: pages | ||
label: Pages | ||
label_singular: 'Page' | ||
folder: content/pages | ||
create: true | ||
slug: '{{slug}}' | ||
fields: | ||
- label: Template | ||
name: template | ||
widget: hidden | ||
default: page | ||
- label: Title | ||
name: title | ||
widget: string | ||
- label: Draft | ||
name: draft | ||
widget: boolean | ||
default: true | ||
- label: Body | ||
name: body | ||
widget: markdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
|
||
<title>Netlify CMS Development Test</title> | ||
</head> | ||
<body> | ||
<script src="dist/netlify-cms.js"></script> | ||
<script> | ||
var PostPreview = createClass({ | ||
render: function() { | ||
var entry = this.props.entry; | ||
return h( | ||
'div', | ||
{}, | ||
h('div', { className: 'cover' }, h('h1', {}, entry.getIn(['data', 'title']))), | ||
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))), | ||
h('div', { className: 'text' }, this.props.widgetFor('body')), | ||
); | ||
}, | ||
}); | ||
|
||
var PagePreview = createClass({ | ||
render: function() { | ||
var entry = this.props.entry; | ||
return h( | ||
'div', | ||
{}, | ||
h('div', { className: 'cover' }, h('h1', {}, entry.getIn(['data', 'title']))), | ||
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))), | ||
h('div', { className: 'text' }, this.props.widgetFor('body')), | ||
); | ||
}, | ||
}); | ||
|
||
CMS.registerPreviewTemplate('posts', PostPreview); | ||
CMS.registerPreviewTemplate('pages', PagePreview); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters