Compare commits
1 Commits
76c166cc01
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca046ef160 |
@@ -1,5 +1,3 @@
|
|||||||
---
|
|
||||||
|
|
||||||
# Hexo Deployer for S3-Compatible Services
|
# Hexo Deployer for S3-Compatible Services
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/hexo-deployer-s3-plus)
|
[](https://www.npmjs.com/package/hexo-deployer-s3-plus)
|
||||||
@@ -88,7 +86,7 @@ hexo clean && hexo generate && hexo deploy
|
|||||||
## Options
|
## Options
|
||||||
|
|
||||||
| Parameter | Required / Optional | Description |
|
| Parameter | Required / Optional | Description |
|
||||||
| --------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `bucket` | **Required** | The name of your S3 bucket. |
|
| `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`. |
|
| `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. |
|
| `access_key_id` | Optional | Your access key. Can also be set via `aws_key`. Omit if using environment variables or an AWS profile. |
|
||||||
@@ -97,6 +95,7 @@ hexo clean && hexo generate && hexo deploy
|
|||||||
| `prefix` | Optional | A sub-directory inside your bucket where the files will be uploaded. E.g., `blog/`. |
|
| `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`. |
|
| `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. |
|
| `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"}`. |
|
| `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_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. |
|
| `aws_key`, `aws_secret` | Optional | Legacy aliases for `access_key_id` and `secret_access_key` for backward compatibility. |
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ hexo clean && hexo generate && hexo deploy
|
|||||||
| `prefix` | 可选 | 文件将被上传到的存储桶内的子目录。例如:`blog/`。 |
|
| `prefix` | 可选 | 文件将被上传到的存储桶内的子目录。例如:`blog/`。 |
|
||||||
| `concurrency` | 可选 | 并行上传的文件数量。默认为 `20`。 |
|
| `concurrency` | 可选 | 并行上传的文件数量。默认为 `20`。 |
|
||||||
| `delete_removed` | 可选 | 如果为 `true`,部署时将自动删除存储桶中存在但本地 `public` 文件夹中不存在的文件。**默认为 `true`**。设置为 `false` 可禁用此同步功能。 |
|
| `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"}`。 |
|
| `headers` | 可选 | 应用于所有已上传文件的 HTTP 头的 JSON 对象。可用于设置缓存策略。示例:`headers: {"Cache-Control": "max-age=31536000"}`。 |
|
||||||
| `aws_cli_profile` | 可选 | 您 `~/.aws/credentials` 文件中用于身份验证的 profile 名称。如果直接提供了 `access_key_id` 和 `secret_access_key`,则此项将被忽略。 |
|
| `aws_cli_profile` | 可选 | 您 `~/.aws/credentials` 文件中用于身份验证的 profile 名称。如果直接提供了 `access_key_id` 和 `secret_access_key`,则此项将被忽略。 |
|
||||||
| `aws_key`, `aws_secret` | 可选 | `access_key_id` 和 `secret_access_key` 的旧别名,用于向后兼容。 |
|
| `aws_key`, `aws_secret` | 可选 | `access_key_id` 和 `secret_access_key` 的旧别名,用于向后兼容。 |
|
||||||
|
|||||||
Reference in New Issue
Block a user