Skip to content
/ blog Public

The blog source code based on ghost, with aliyun oss and cdn support.

License

Notifications You must be signed in to change notification settings

SwiftHow/blog

Repository files navigation

blog

Ghost Support License MIT

The blog source code based on ghost, with aliyun oss support.

Contain

Note

This project have NO VALUE for develop, and based on official ghost release, and merged with ghostchina's storage part.

Support Aliyun CDN

in config file:

{
    storage: {
        provider: 'oss',
        bucketname: 'your-bucket-name',
        ACCESS_KEY: 'xxxxxx',
        SECRET_KEY: 'xxxxxx',
        root: '/files/',
        prefix: 'https://your-bucket-name.oss-cn-qingdao.aliyuncs.com',
        cdnPrefix: 'https://your-cdn-alise.alikunlun.com'          // Set cdnPrefix here.
    }
}

use this project /core/storage/oss.js file. you can see:

// prefix + targetFilename
var fullUrl = (ossConfig.cdnPrefix ? ossConfig.cdnPrefix : ossConfig.prefix) + targetFilename;
return fullUrl;

This will save link in ghost db with cdnPrefix first, but still upload file to oss with prefix.

About

The blog source code based on ghost, with aliyun oss and cdn support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages