IMPORTANT: You MUST be running Ghost 0.6.0 or later. Previous versions of Ghost do not support external storage solutions.
PLEASE create an issue if you have any problems.
Cloudinary has some "advanced configuration options" for Pro users and etc.. that this module does not currently handle. If you would like support for these options added, please create an issue or submit a PR!
In Ghost's root directory
-
Run
npm install ghost-cloudinary-store(note the lack of--save) -
Make the storage folder if it doesn't already exist
mkdir content/storage -
Copy
ghost-cloudinary-storefromnode_modulestocontent/storage
cp -r node_modules/ghost-cloudinary-store content/storage/ghost-cloudinary-store
- Follow the instructions below for editing config.js
Note: The master branch reflects what is published on NPM
-
Navigate to Ghost's
contentdirectory and create a directory calledstorage -
Navigate into this new
storagedirectory and rungit clone https://github.com/rakshans1/ghost-cloudinary-store.git -
Navigate into
ghost-cloudinary-storeand runnpm install -
Follow the instructions below for editing config.js
You have two options for configuring Ghost to work with your Cloudinary account:
- By using your Cloudinary credentials:
cloud_name,api_key, andapi_secret. - By setting a
CLOUDINARY_URLenvironment variable.
In Ghost's config.js (the file where you set your URL, mail settings, etc..) add a block to whichever environment you're using (production, development, etc...) as follows:
Note: These values can be obtained from your Cloudinary management console.
storage: {
active: 'ghost-cloudinary-store',
'ghost-cloudinary-store': {
cloud_name: 'yourCloudName',
api_key: 'yourApiKey',
api_secret: 'yourApiSecret'
}
}Further reading available here.
NOTE: I haven't personally gotten this option to work, but it should according to Cloudinary's documentation. Maybe stick with the credentials option above. If you make this option work, please let me know [here][4].
In Ghost's config.js (the file where you set your URL, mail settings, etc..) add a block to whichever environment you're using (production, development, etc...) as follows:
storage: {
active: 'ghost-cloudinary-store'
}Then set the CLOUDINARY_URL environment variable, available from your Cloudinary management console.
It will look something like CLOUDINARY_URL=cloudinary://874837483274837:a676b67565c6767a6767d6767f676fe1@sample.
Further reading available here.
If you don't know what an environment variable is, read this.
If you set secure to true in config.js, your blog will use secure (https) URLs.
storage: {
active: 'ghost-cloudinary-store',
'ghost-cloudinary-store': {
secure: true
}
}