ghost-qcloud-cos-store v1.0.1
Ghost QCloud(TencentYun) COS Storage
This is an implement of Ghost custom storage module allows you to store images over QCloud instead of local disk.
Supported
This module works well with 1.x. I haven't test it on 0.x. If you have any problem, please submit an issue.
Installation
Via NPM
Install
ghost-qcloud-cos-storenpm install ghost-qcloud-cos-storeGo to
ghost/content/adapters/sotrage. Ifcontentfolder is empty, create the folders first.Create a file named
qcloud-cos-storewith the content blow:module.exports = require('ghost-qcloud-cos-store');
Via Git
Go to
ghost/content/adapters/storage. Ifcontentfolder is empty, create the folders first.Clone this repo to
storagecd ghost/content/adapters/storage git clone https://github.com/zkd8907/ghost-qcloud-cos-store.git qcloud-cos-storeInstall dependencies
cd qcloud-cos-storage npm install
Configuration
Edit ghost/config.production.json and add a new storage key to specify the custom storage.
{
...
"storage": {
"active": "qcloud-cos-store",
"qcloud-cos-store": {
"Bucket": "{BucketName}-{AppId}",
"Region": "{BucketRegion}",
"SecretId": "{SecretId}",
"SecretKey": "{SecretKey}",
"staticDomain": "https://static.zkd.me"
}
}
}All the keys are necessary except staticDomain.
The value of active must be the same with the name of the file(Via NPM) or the folder(Via Git) in ghost/content/adapters/storage. You can find your Bucket Name, Appid, SecureId and SecureKey at your console of QCloud. The all regions are listed at https://cloud.tencent.com/document/product/436/6224.
staticDomain is optional. Normally, you need to specify a CDN domain to visit the full URL starts with http or https.
License
Read LICENSE