diff --git a/README.md b/README.md index 16844c4..e371ac2 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ deploy: headers: // pass any headers to S3, usefull for metadata cache setting of Hexo assets prefix: // Optional, prefix ending in / delete_removed: // if true will delete removed files from S3. Default: true + endpoint: // Optional, for S3 compatiable services ``` If you installed the AWS command-line tool and provided your credentials via `aws configure`, diff --git a/lib/deployer.js b/lib/deployer.js index d0a91c6..b2c935e 100644 --- a/lib/deployer.js +++ b/lib/deployer.js @@ -15,6 +15,9 @@ module.exports = function(args) { region: args.region } }; + if (args.endpoint) { + config.endpoint = args.endpoint; + } if (!config.s3Options.accessKeyId && !config.s3Options.secretAccessKey && args.aws_cli_profile) { /* User configured their access and secret keys in ~/.aws/credentials, check there */ var iniFile = path.join(process.env.HOME, '.aws'); @@ -52,6 +55,7 @@ module.exports = function(args) { help += ' [headers]: # Optional, see README.md file\n'; help += ' [prefix]: # Optional, prefix ending in /\n'; help += ' [delete_removed]: # Optional, if true will delete removed files from S3 /\n\n'; + help += ' [endpoint]: # Optional, for S3 compatiable services\n' help += 'For more help, you can check the docs: ' + chalk.underline('https://github.com/nt3rp/hexo-deployer-s3'); console.log(help);