Introduction
This is a hexo deployer plugin which help you to embed static file stored on qiniu
The point is you don't need upload files to qiniu manual
基于hexo-qiniu-sync修改,删减了大部分功能,仅保留文件上传的部分。
Installation
To install, run the following command in the root directory of hexo:
npm install hexo-deployer-qiniu --save
And add this plugin in your _config.yml
.
##七牛云存储设置
##type 类型,这里填写qiniu
##bucket 空间名称
##access_key 上传密钥AccessKey
##secret_key 上传密钥SecretKey
##sync_dir 上传目录,默认上传: public/*,填写后上传: public/qiniu_dir(包含qiniu_dir目录本身)
deploy:
- type: git
repo: ***
branch: master
- type: qiniu
bucket: ***
access_key: ***
secret_key: ***
sync_dir: static
##prefix 静态文件访问的前缀,例如:http://7xo6lp.com1.z0.glb.clouddn.com/static/;用于标签解析解析
##extend 这是个特殊参数,用于生成缩略图或加水印等操作。具体请参考http://developer.qiniu.com/docs/v6/api/reference/fop/image/
qiniu:
prefix: http://7xo6lp.com1.z0.glb.clouddn.com/static/
extend: ?imageView2/2/w/800/h/2000