From 9c76a140c7ada8c90e89a0a12b74d48bc8c79829 Mon Sep 17 00:00:00 2001 From: tiuweehan <39181981+tiuweehan@users.noreply.github.com> Date: Mon, 3 Feb 2020 17:05:33 +0800 Subject: [PATCH] docs: fix media library usage (#3181) --- .../content/blog/netlify-cms-gatsby-plugin-4-0-0.md | 10 +++++----- website/content/docs/cloudinary.md | 2 ++ website/content/docs/uploadcare.md | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/website/content/blog/netlify-cms-gatsby-plugin-4-0-0.md b/website/content/blog/netlify-cms-gatsby-plugin-4-0-0.md index 4f962346..c5602582 100644 --- a/website/content/blog/netlify-cms-gatsby-plugin-4-0-0.md +++ b/website/content/blog/netlify-cms-gatsby-plugin-4-0-0.md @@ -96,15 +96,15 @@ The Netlify CMS media library extensions for Cloudinary and Uploadcare are not i **Note:** if you're using `gatsby-starter-netlify-cms`, the media libraries are registered within the starter itself. ```javascript -import CMS from 'netlify-cms-app' +import CMS from 'netlify-cms-app'; // You only need to import the media library that you'll use. We register both // here for example purposes. -import uploadcare from 'netlify-cms-media-library-uploadcare' -import cloudinary from 'netlify-cms-media-library-cloudinary' +import uploadcare from 'netlify-cms-media-library-uploadcare'; +import cloudinary from 'netlify-cms-media-library-cloudinary'; -CMS.registerMediaLibrary('uploadcare', uploadcare) -CMS.registerMediaLibrary('cloudinary', cloudinary) +CMS.registerMediaLibrary(uploadcare); +CMS.registerMediaLibrary(cloudinary); ``` For more information about the media libraries, refer to the docs. diff --git a/website/content/docs/cloudinary.md b/website/content/docs/cloudinary.md index 7b0ad781..6c30fdcb 100644 --- a/website/content/docs/cloudinary.md +++ b/website/content/docs/cloudinary.md @@ -27,6 +27,8 @@ media_library: **Note:** The user must be logged in to the Cloudinary account connected to the `api_key` used in your Netlify CMS configuration. +**Note:** The Netlify CMS media library extensions for Cloudinary are not included in `netlify-cms-app`. If you're using `netlify-cms-app`, you'll need to [register the media libraries yourself](https://www.netlifycms.org/blog/2019/07/netlify-cms-gatsby-plugin-4-0-0#using-media-libraries-with-netlify-cms-app). + ### Security Considerations Although this setup exposes the `cloud_name` and `api_key` publicly via the `/admin/config.yml` endpoint, this information is not sensitive. Any integration of the Cloudinary media library requires this information to be exposed publicly. To use this library or use the restricted Cloudinary API endpoints, the user must have access to the Cloudinary account login details or the `api_secret` associated with the `cloud_name` and `api_key`. diff --git a/website/content/docs/uploadcare.md b/website/content/docs/uploadcare.md index 28804473..ae5c7877 100644 --- a/website/content/docs/uploadcare.md +++ b/website/content/docs/uploadcare.md @@ -43,6 +43,8 @@ media_library: Once you've finished updating your Netlify CMS configuration, the Uploadcare widget will appear when using the image or file widgets. +**Note:** The Netlify CMS media library extensions for Uploadcare are not included in `netlify-cms-app`. If you're using `netlify-cms-app`, you'll need to [register the media libraries yourself](https://www.netlifycms.org/blog/2019/07/netlify-cms-gatsby-plugin-4-0-0#using-media-libraries-with-netlify-cms-app). + ## Configuring the Uploadcare Widget The Uploadcare widget can be configured with settings that are outlined [in their