{"id":16461563,"url":"https://github.com/stringbean/hexo-deployer-aws-s3","last_synced_at":"2026-07-06T20:31:35.701Z","repository":{"id":44763916,"uuid":"451216151","full_name":"stringbean/hexo-deployer-aws-s3","owner":"stringbean","description":"Hexo plugin for deploying to S3","archived":false,"fork":false,"pushed_at":"2023-12-30T19:46:13.000Z","size":1020,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-29T16:43:07.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stringbean.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-23T19:59:45.000Z","updated_at":"2023-03-20T12:00:26.000Z","dependencies_parsed_at":"2024-10-13T15:01:43.904Z","dependency_job_id":"94787592-2a70-4212-9b4f-f37fd21cd5d6","html_url":"https://github.com/stringbean/hexo-deployer-aws-s3","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"9dce9e7bacbd03595ba13a9b7d7b8caf6f32a7d6"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/stringbean/hexo-deployer-aws-s3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringbean%2Fhexo-deployer-aws-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringbean%2Fhexo-deployer-aws-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringbean%2Fhexo-deployer-aws-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringbean%2Fhexo-deployer-aws-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stringbean","download_url":"https://codeload.github.com/stringbean/hexo-deployer-aws-s3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringbean%2Fhexo-deployer-aws-s3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264578494,"owners_count":23631546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T11:08:40.198Z","updated_at":"2025-10-25T21:32:57.607Z","avatar_url":"https://github.com/stringbean.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hexo S3 Deployer\n\n![npm version](https://img.shields.io/npm/v/@string-bean/hexo-deployer-aws-s3)\n![License](https://img.shields.io/npm/l/@string-bean/hexo-deployer-aws-s3)\n\nPlugin for deploying [Hexo](https://hexo.io) sites to Amazon S3.\n\nThis is an alternative to the existing [hexo-deployer-s3](https://github.com/nt3rp/hexo-deployer-s3) and\n[hexo-deployer-s3-cloudfront](https://github.com/Wouter33/hexo-deployer-s3-cloudfront) plugins that has been written\nfrom the ground up to use the new AWS SDK v3.\n\n## Installation\n\n```shell\nnpm install -S @string-bean/hexo-deployer-aws-s3\n```\n\n## Usage\n\nAdd the following section to your Hexo `_config.yml`:\n\n```yaml\ndeploy:\n  type: aws-s3\n  region: us-east-1\n  bucket: example-bucket\n```\n\nAnd then deploy using `hexo deploy`.\n\n### CloudFront Invalidation\n\nAfter deploying to S3 the plugin can optionally invalidate a CloudFront distribution to force a cache refresh. To do\nthis, add the CloudFront distribution ID to your Hexo config:\n\n```yaml\ndeploy:\n  type: aws-s3\n  region: us-east-1\n  bucket: example-bucket\n  cloudfront_distribution: EXAMPLE123\n```\n\n### Redirect Rules\n\nAdding S3 [webpage redirects][s3-redirects] is supported via entries in the Hexo config and via page front-matter.\n\n:warning: Any existing webpage redirects configured for the S3 bucket will get overwritten by the redirects generated\nby this plugin.\n\n#### Via Front-Matter\n\nWith a `permalink` setting of `:year/:month/:day/:title/` and the following front-matter:\n\n```yaml\n---\ntitle: Exciting Post\ndate: 2022-01-01 12:00:00\nredirect_from: old-path.html\n---\n```\n\nA redirect from `old-path.html` to `2022/01/01/exciting-post` will be generated.\n\n#### Via Config\n\nAdditionally, redirects can be specified directly in the Hexo config:\n\n```yaml\ndeploy:\n  type: aws-s3\n  redirects:\n    'old.html': 'new-post'\n    'another.html': 'pages/something/new'\n```\n\nWill generate the following redirects:\n\n- `old.html` to `new-post`.\n- `another.html` to `pages/something/new`.\n\n### Cache Policies\n\nCache expiry durations can be defined on a per MIME type basis and are defined in seconds. Any unmatched MIME types will\nbe served without a cache header.\n\nFor example:\n\n```yaml\ndeploy:\n  type: aws-s3\n  cache_policies:\n    text/css: 86400 # 24 hours\n```\n\nWill serve the following header for CSS files:\n\n```text\nCache-Control: public, max-age=86400;\n```\n\n## Options\n\n| Name                      | Default    | Description                                                                           |\n| ------------------------- | ---------- | ------------------------------------------------------------------------------------- |\n| `region`                  | _required_ | AWS region that the bucket is hosted in.                                              |\n| `bucket`                  | _required_ | AWS bucket to upload to.                                                              |\n| `profile`                 | `default`  | AWS credentials profile to use (see [Named Profiles][aws-profiles]).                  |\n| `delete_unknown`          | `false`    | If `true` then any unknown files will be deleted from the bucket.                     |\n| `cloudfront_distribution` | _none_     | CloudFront distribution ID to invalidate on deploy.                                   |\n| `redirects`               | _none_     | Mappings of from path → destination path that will get converted into redirect rules. |\n| `host_name`               | _none_     | Domain name of the S3 website that will be used for redirects.                        |\n| `cache_policies`          | _none_     | Map of MIME types to cache-expiry duration (in seconds).                              |\n\n[aws-profiles]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html\n[s3-redirects]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-page-redirect.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringbean%2Fhexo-deployer-aws-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstringbean%2Fhexo-deployer-aws-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringbean%2Fhexo-deployer-aws-s3/lists"}