Building rocket with the crane.
curl https://stonegate.me/shConfigure the homepage photo gallery with Cloudflare-hosted images:
CLOUDFLARE_IMAGE_BUCKET_URL=https://pub-68d4e56b495346c097026e9087c01342.r2.dev
CLOUDFLARE_IMAGE_BUCKET_PREFIX=
CLOUDFLARE_IMAGE_BUCKET_IMAGES=photo-1.jpg,photo-2.jpg,photo-3.jpgBuild-time R2 sync:
CLOUDFLARE_ACCOUNT_ID=your-account-id
CLOUDFLARE_R2_BUCKET_NAME=your-r2-bucket-name
CLOUDFLARE_R2_ACCESS_KEY_ID=your-access-key-id
CLOUDFLARE_R2_SECRET_ACCESS_KEY=your-secret-access-keyThese can live in .env.local, which is ignored by git.
Then run:
pnpm run sync:gallery
pnpm buildThe sync script lists objects from the configured prefix, filters image files, and writes the gallery cache to .cache/home-gallery.json. Leave CLOUDFLARE_IMAGE_BUCKET_PREFIX empty when the files live at the bucket root.
Optional manifest support:
CLOUDFLARE_IMAGE_BUCKET_MANIFEST_URL=https://pub-68d4e56b495346c097026e9087c01342.r2.dev/gallery.jsonThe manifest can be either an array of strings or an array/object with photos or images.