denzuko/R2 Asset Sync

Sync Hugo static site assets to Cloudflare R2 via the S3-compatible endpoint. Sets correct Cache-Control headers per asset type, deletes stale objects, and runs a CDN smoke test on completion.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
r2-access-key-idCloudflare R2 API token access key IDyes
r2-secret-access-keyCloudflare R2 API token secret access keyyes
r2-account-idCloudflare account IDyes
r2-bucketR2 bucket name (e.g. assets-cdn-example-com)yes
build-dirPath to Hugo build output directorynohugo/public
cdn-domainCustom CDN domain for smoke test (e.g. assets.cdn.example.com). If omitted the smoke test is skipped. no""
asset-dirsSpace-separated list of asset subdirectories to sync with immutable Cache-Control. Defaults cover standard Hugo output. nocss js fonts images og
favicon-patternsSpace-separated glob patterns for root-level assets synced with 24-hour Cache-Control (not content-hashed). nofavicon* apple-touch* site.webmanifest
namedescription
endpointThe R2 S3-compatible endpoint URL used for the sync
objects-syncedNumber of objects uploaded or updated