Gathering detailed insights and metrics for empress-blog-netlify-cms
Gathering detailed insights and metrics for empress-blog-netlify-cms
Gathering detailed insights and metrics for empress-blog-netlify-cms
Gathering detailed insights and metrics for empress-blog-netlify-cms
npm install empress-blog-netlify-cms
Typescript
Module System
Min. Node Version
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
27
empress-blog-netlify-cms aims to integrate Netlify CMS with empress-blog.
Empress-blog is a fully-functional, static site implementation of a blog system built on EmberJS.
Netlify CMS is a React single page app for editing git based content via API. Its built for non-technical and technical editors alike, and its super easy to install and configure.
ember install empress-blog-netlify-cms
empress-blog-netlify-cms
to the empress-blog project.For detailed instruction check this blog post.
By default addon configures Netlify CMS with git-gateway backend. You can change this though the addon options.
empress-blog-netlify-cms
aims to be zero config implementation to connect Netlify CMS with empress-blog.
But if you wish to modify or enhance the default implementation, there are a couple of options available:
netlify-config
(optional, type: Object
)
Use this to modify the default netlify-CMS config file. Object passed here will me be merged with the default config object.
ember-cli-build.js
1 'empress-blog-netlify-cms': { 2 'netlify-config: { 3 "backend" { 4 "name": "github", 5 "repo": "owner-name/repo-name" 6 } 7 } 8 }
The default netlify-CMS config config is:
1{ 2 "backend": { 3 "name": "git-gateway", 4 "branch": "master" 5 }, 6 "media_folder": "public/uploads", 7 "public_folder": "/uploads", 8 "collections": [ 9 { 10 "name": "blog", 11 "label": "Blog", 12 "folder": "content/", 13 "create": true, 14 "slug": "{{year}}-{{month}}-{{day}}-{{slug}}", 15 "fields": [ 16 { 17 "name": "title", 18 "label": "Title", 19 "widget": "string" 20 }, 21 { 22 "name": "image", 23 "label": "Image", 24 "widget": "image", 25 "required": false 26 }, 27 { 28 "name": "imageMeta", 29 "label": "ImageMeta", 30 "widget": "object", 31 "collapsed": true, 32 "fields": [ 33 { 34 "label": "attribution", 35 "name": "attribution", 36 "widget": "string", 37 "default": "", 38 "required": false 39 }, 40 { 41 "label": "attributionLink", 42 "name": "attributionLink", 43 "widget": "string", 44 "default": "", 45 "required": false 46 } 47 ] 48 }, 49 { 50 "name": "featured", 51 "label": "Featured", 52 "widget": "boolean", 53 "default": true 54 }, 55 { 56 "name": "authors", 57 "label": "Authors", 58 "widget": "list", 59 "default": [ 60 "ghost" 61 ] 62 }, 63 { 64 "name": "tags", 65 "label": "Tags", 66 "widget": "list", 67 "default": [ 68 "new" 69 ], 70 "required": false 71 }, 72 { 73 "name": "body", 74 "label": "Body", 75 "widget": "markdown" 76 }, 77 { 78 "label": "Publish Date", 79 "name": "date", 80 "widget": "datetime", 81 "format": "ddd MMM DD YYYY h:mm:ss a" 82 } 83 ] 84 }, 85 { 86 "name": "author", 87 "label": "Author", 88 "folder": "author/", 89 "create": true, 90 "slug": "{{name}}", 91 "fields": [ 92 { 93 "name": "name", 94 "label": "Name", 95 "widget": "string" 96 }, 97 { 98 "name": "id", 99 "label": "Id", 100 "widget": "string" 101 }, 102 { 103 "name": "image", 104 "label": "Image", 105 "widget": "image", 106 "required": false 107 }, 108 { 109 "name": "cover", 110 "label": "Cover", 111 "widget": "string", 112 "required": false 113 }, 114 { 115 "name": "website", 116 "label": "Website", 117 "widget": "string", 118 "required": false 119 }, 120 { 121 "name": "twitter", 122 "label": "Twitter", 123 "widget": "string", 124 "required": false 125 }, 126 { 127 "name": "facebook", 128 "label": "Facebook", 129 "widget": "string", 130 "required": false 131 }, 132 { 133 "name": "location", 134 "label": "Location", 135 "widget": "string", 136 "required": false 137 }, 138 { 139 "name": "body", 140 "label": "Body", 141 "widget": "markdown", 142 "required": false 143 } 144 ] 145 }, 146 { 147 "name": "tag", 148 "label": "Tag", 149 "folder": "tag/", 150 "create": true, 151 "slug": "{{name}}", 152 "fields": [ 153 { 154 "name": "name", 155 "label": "Name", 156 "widget": "string" 157 }, 158 { 159 "name": "image", 160 "label": "Image", 161 "widget": "image", 162 "required": false 163 }, 164 { 165 "name": "body", 166 "label": "Body", 167 "widget": "markdown", 168 "required": false 169 } 170 ] 171 } 172 ] 173}
To view the default config in yml, click here.
modulePath
(optional, type: string | Array<string>
, default: undefined
)
If you need to customize Netlify CMS, e.g. registering custom widgets or
styling the preview pane,
you'll need to do so in a JavaScript file and provide empress-blog-netlify-cms with the path to
your file via the modulePath
option.
ember-cli-build.js
1 'empress-blog-netlify-cms': { 2 modulePath: `${__dirname}/custom-netlify-script.js` 3 }
The js file might look like this:
CMS.registerPreviewStyle("/example.css");
publicPath
(optional, type: string
, default: "admin"
)
Customize the path to Netlify CMS on your Empress site.
disableIdentityScriptInIndex
(optional, type: boolean
, default: false
)
By default empress-blog-netlify-cms
adds netlify-identity-widget to your index page of the project for netlify user activation mails to work. Pass false if you wish to disable this.
See the Contributing guide for details.
This project is licensed under the MIT License.
No vulnerabilities found.
No security vulnerabilities found.