Skip to content

Commit 592b748

Browse files
authored
Added steps to remove netlify-cms media libraries (#428)
1. I think in 99% of the case having one media library will be enough for the usecases the starter is used. By removing at least one of the media libraries the user can shave off 20 secs of build time and also the bundle size is much lower. The instructions in the `README.md` tries to explain this in a very unapinionated way 2. Added some formatting to the commit messages, also having `[skip ci]` in the commit message will skip the build prpcess in most CIs (Netlify CI included) which i think very usefull because the user still needs to embed the images and that will also trigger a build.
1 parent 456de75 commit 592b748

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ CMS.registerPreviewTemplate('products', ProductPagePreview)
8080
CMS.registerPreviewTemplate('blog', BlogPostPreview)
8181
```
8282

83+
Note: Don't forget to also remove them from `package.json` and `yarn.lock` / `package-lock.json` using `yarn` or `npm`. During the build netlify-cms-app will bundle the media libraries as well, having them removed will save you build time.
84+
Example:
85+
```
86+
yarn remove netlify-cms-media-library-uploadcare
87+
```
88+
OR
89+
```
90+
yarn remove netlify-cms-media-library-cloudinary
91+
```
8392
## Getting Started (Without Netlify)
8493

8594
```

static/admin/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
backend:
22
name: git-gateway
33
branch: master
4+
commit_messages:
5+
create: 'Create {{collection}} “{{slug}}”'
6+
update: 'Update {{collection}} “{{slug}}”'
7+
delete: 'Delete {{collection}} “{{slug}}”'
8+
uploadMedia: '[skip ci] Upload “{{path}}”'
9+
deleteMedia: '[skip ci] Delete “{{path}}”'
410

511
media_folder: static/img
612
public_folder: /img

0 commit comments

Comments
 (0)