名称:ghost-oss-store
环境:Node.js
作者:MT-Libraries(小组)
Github:https://github.com/MT-Libraries/ghost-oss-store
简介
如其名,该插件为 Node.js 环境下知名博客程序 Ghost 自定义存储插件,为阿里云
对象存储
OSS 适配制作的数据存储插件。
该Ghost自定义存储模块允许您将媒体文件与Aliyun OSS存储在一起,而不是存储在本地机器上。
支持的Ghost版本
1.X
0.X
安装
npm install ghost-oss-store
mkdir content/storage
cp -vR node_modules/ghost-oss-store content/storage/oss-store
cd [path/to/ghost]/content/storage
mkdir oss-store && cd oss-store
git clone https://github.com/MT-Libraries/ghost-oss-store ./
npm install
storage: {
active: 'oss-store',
'oss_store': {
accessKeyId: 'accessKeyId',
accessKeySecret: 'accessKeySecret',
bucket: 'bucket',
region: 'oss-cn-hangzhou',
origin: 'https://www.thonatos.com/', // if you have bind custom domain to oss bucket. or false
fileKey: {
safeString: true, // use Ghost safaString util to rename filename, e.g. Chinese to Pinyin
prefix: 'ghost/', // { String } will be formated by moment.js, using `[]` to escape,
suffix: '' // { String } string added before file extname.
}
}
}
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
Ghost-oss-store 是一个专为Node.js环境下的Ghost博客平台设计的插件,它使得用户能够将媒体文件存储在阿里云对象存储(OSS)上,而非默认的本地存储。这样不仅能够提升网站的访问速度,还能有效节省服务器空间和带宽成本,尤其适合那些拥有大量媒体资源的博客站点。
npm install ghost-oss-store
content/storage
文件夹。
mkdir content/storage
cp -vR node_modules/ghost-oss-store content/storage/oss-store
cd [path/to/ghost]/content/
mkdir storage
cd storage
mkdir oss-store
git clone https://github.com/MT-Libraries/ghost-oss-store.git oss-store
或者使用SSH地址,如果你有相应的权限设置:
git clone git@github.com:MT-Libraries/ghost-oss-store.git oss-store
安装完成后,你还需要在Ghost的配置文件中设置OSS的相关参数,如Access Key、Secret Key、Bucket名称以及Endpoint等,以确保Ghost能够正确连接到你的阿里云OSS服务。具体配置步骤和参数说明通常可以在ghost-oss-store
的GitHub页面的README文档中找到。
请记得,在进行任何配置更改后,重启Ghost服务以使更改生效。
通过上述步骤,你就能够成功地将Ghost博客的媒体文件存储集成到阿里云OSS中,享受云存储带来的便利和高效。