Skip to content

vkuznecovas/hexo-deployer-s3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  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

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

About

S3 deployer plugin for Hexo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%