diff --git a/README.md b/README.md index c6d0862..171ba10 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ ---- - # Hexo Deployer for S3-Compatible Services [![NPM version](https://img.shields.io/npm/v/hexo-deployer-s3-plus.svg?style=flat-square)](https://www.npmjs.com/package/hexo-deployer-s3-plus) @@ -87,19 +85,20 @@ hexo clean && hexo generate && hexo deploy ## Options -| Parameter | Required / Optional | Description | -| --------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `bucket` | **Required** | The name of your S3 bucket. | -| `endpoint` | **Required** | The S3 API endpoint URL of your storage provider. For AWS, this would be like `https://s3.us-east-1.amazonaws.com`. | -| `access_key_id` | Optional | Your access key. Can also be set via `aws_key`. Omit if using environment variables or an AWS profile. | -| `secret_access_key` | Optional | Your secret key. Can also be set via `aws_secret`. Omit if using environment variables or an AWS profile. | -| `region` | Optional | The region of your bucket. **Crucial for AWS S3**. For other S3 services, this can often be a placeholder string like `us-east-1`, but is still recommended. | -| `prefix` | Optional | A sub-directory inside your bucket where the files will be uploaded. E.g., `blog/`. | -| `concurrency` | Optional | The number of files to upload in parallel. Defaults to `20`. | -| `delete_removed` | Optional | If `true`, files in the bucket that don't exist in your local `public` folder will be deleted upon deployment. **Defaults to `true`**. Set to `false` to disable this synchronization. | -| `headers` | Optional | A JSON object of HTTP headers to apply to all uploaded files. Useful for setting caching policies. Example: `headers: {"Cache-Control": "max-age=31536000"}`. | -| `aws_cli_profile` | Optional | The name of a profile in your `~/.aws/credentials` file to use for authentication. Ignored if `access_key_id` and `secret_access_key` are provided directly. | -| `aws_key`, `aws_secret` | Optional | Legacy aliases for `access_key_id` and `secret_access_key` for backward compatibility. | +| Parameter | Required / Optional | Description | +| --------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `bucket` | **Required** | The name of your S3 bucket. | +| `endpoint` | **Required** | The S3 API endpoint URL of your storage provider. For AWS, this would be like `https://s3.us-east-1.amazonaws.com`. | +| `access_key_id` | Optional | Your access key. Can also be set via `aws_key`. Omit if using environment variables or an AWS profile. | +| `secret_access_key` | Optional | Your secret key. Can also be set via `aws_secret`. Omit if using environment variables or an AWS profile. | +| `region` | Optional | The region of your bucket. **Crucial for AWS S3**. For other S3 services, this can often be a placeholder string like `us-east-1`, but is still recommended. | +| `prefix` | Optional | A sub-directory inside your bucket where the files will be uploaded. E.g., `blog/`. | +| `concurrency` | Optional | The number of files to upload in parallel. Defaults to `20`. | +| `delete_removed` | Optional | If `true`, files in the bucket that don't exist in your local `public` folder will be deleted upon deployment. **Defaults to `true`**. Set to `false` to disable this synchronization. | +| `force_path_style` | Optional | If `true`, S3 endpoint URL will use Path Style instead of Virtual Host Style. **Defaults to `true`**. Set to `false` to disable. | +| `headers` | Optional | A JSON object of HTTP headers to apply to all uploaded files. Useful for setting caching policies. Example: `headers: {"Cache-Control": "max-age=31536000"}`. | +| `aws_cli_profile` | Optional | The name of a profile in your `~/.aws/credentials` file to use for authentication. Ignored if `access_key_id` and `secret_access_key` are provided directly. | +| `aws_key`, `aws_secret` | Optional | Legacy aliases for `access_key_id` and `secret_access_key` for backward compatibility. | ## Troubleshooting @@ -115,4 +114,4 @@ hexo clean && hexo generate && hexo deploy ## License -[MIT](https://opensource.org/licenses/MIT) \ No newline at end of file +[MIT](https://opensource.org/licenses/MIT) diff --git a/README_zh.md b/README_zh.md index e11b10d..b9f5198 100644 --- a/README_zh.md +++ b/README_zh.md @@ -91,6 +91,7 @@ hexo clean && hexo generate && hexo deploy | `prefix` | 可选 | 文件将被上传到的存储桶内的子目录。例如:`blog/`。 | | `concurrency` | 可选 | 并行上传的文件数量。默认为 `20`。 | | `delete_removed` | 可选 | 如果为 `true`,部署时将自动删除存储桶中存在但本地 `public` 文件夹中不存在的文件。**默认为 `true`**。设置为 `false` 可禁用此同步功能。 | +| `force_path_style` | 可选 | 如果为`true`,S3 API 端点 URL 会使用 Path Style 而非 Virtual Host Style。**默认为 `true`**。设置为 `false` 可禁用此功能。 | | `headers` | 可选 | 应用于所有已上传文件的 HTTP 头的 JSON 对象。可用于设置缓存策略。示例:`headers: {"Cache-Control": "max-age=31536000"}`。 | | `aws_cli_profile` | 可选 | 您 `~/.aws/credentials` 文件中用于身份验证的 profile 名称。如果直接提供了 `access_key_id` 和 `secret_access_key`,则此项将被忽略。 | | `aws_key`, `aws_secret` | 可选 | `access_key_id` 和 `secret_access_key` 的旧别名,用于向后兼容。 | @@ -109,4 +110,4 @@ hexo clean && hexo generate && hexo deploy ## 许可证 -[MIT](https://opensource.org/licenses/MIT) \ No newline at end of file +[MIT](https://opensource.org/licenses/MIT)