fredjean / middleman-s3_sync

The gem that tries really hard not to push files to S3.
MIT License
271 stars 75 forks source link

Making website static hosting optional #130

Open sandstrom opened 7 years ago

sandstrom commented 7 years ago

Thanks for an awesome extension! 🎈 🌳

When using CloudFront to serve the site (from S3) it's useful not having static website hosting on the bucket enabled.

Is there a way to configure this with S3-sync? (setting the acl to 'private' helps but it's still published, I'd rather not have it published at all)

Also, out of curiosity, have you considered using the AWS Ruby gem instead of fog?

fredjean commented 7 years ago

S3 Sync doesn't require the bucket to be a website. This is something that is configured outside of it.

As for fog vs AWS Ruby... I am cranky enough at fog, but I don't have the time or energy to rewrite the gem. I will however accept a PR that would do it.

tgautier commented 7 years ago

You have to remove the following lines if you don't want static website hosting to be enabled.

s3_sync.index_document             = 'index.html'
s3_sync.error_document             = '404.html'