hexo-deployer-s3
Amazon S3 deployer plugin for Hexo
Last updated 2 years ago by nt3rp .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hexo-deployer-s3 
SYNC missed versions from official npm registry.

hexo-deployer-s3

Amazon S3 deployer plugin for Hexo

Installation

$ npm install hexo-deployer-s3 --save

Options

You can configure this plugin in _config.yml.

# You can use this:
deploy:
  type: s3
  bucket: <S3 bucket>
  aws_key: <AWS id key>  // Optional, if the environment variable `AWS_ACCESS_KEY_ID` is set
  aws_secret: <AWS secret key>  // Optional, if the environment variable `AWS_SECRET_ACCESS_KEY` is set
  aws_cli_profile: <an AWS CLI profile name, e.g. 'default'> // Optional
  concurrency: <number of connections> // Optional
  region: <region>  // Optional, see https://github.com/LearnBoost/knox#region
  headers: <headers in JSON format> // pass any headers to S3, usefull for metadata cache setting of Hexo assets
  prefix: <prefix> // Optional, prefix ending in /
  delete_removed: <true|false> // if true will delete removed files from S3. Default: true

If you installed the AWS command-line tool and provided your credentials via aws configure, you can re-use those credentials. Specify a value for aws_cli_profile, such as "default", and leave aws_key, aws_secret, and region blank. If you provide key, secret, and/or region explicitly or via the environment, they will override what's in your AWS CLI profile.

Example: header Cache-Control

deploy:
  type: s3
  bucket: my-site-bucket
  headers: {CacheControl: 'max-age=604800, public'}

This will set "Cache-Control" header in every file deployed to max-age 1 week. This solves "Leverage browser caching" on most page speed analyzers. For custom metadata use:

  headers: {Metadata : { x-amz-meta-mykey: "my value" }}

Contributors

License

MIT

Current Tags

  • 0.2.4                                ...           latest (2 years ago)

8 Versions

  • 0.2.4                                ...           2 years ago
  • 0.2.333                                ...           2 years ago
  • 0.2.2                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           6 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |