hexo-deployer-aws-s3

安装插件

# 进入到 hexo 主目录,执行如下命令
npm install hexo-deployer-aws-s3 --save-dev

配置 _config.yml

# 配置 hexo 项目中的 _config.yml 文件
deploy:
type: aws-s3 # The name of this plugin
region: us-east-1 # The region where your bucket is located
bucket: my-bucket # The name of your bucket
prefix: blog-resources # The s3 key prefix

配置 aws key

# mac 系统将对应的 key 配置到 ~/.zprofile 中
export AWS_ACCESS_KEY_ID=xxxx
export AWS_SECRET_ACCESS_KEY=xxxxxxxx

部署到 s3

hexo deploy

参考