laurilehmijoki / jekyll-s3

Push your Jekyll Blog to Amazon S3!
182 stars 20 forks source link

Push to sub-directory? #20

Open jblanton opened 11 years ago

jblanton commented 11 years ago

I'm going to be using Jekyll to host two blogs on the same domain--one at "/" and one at "/subdir". Is there a way to tell Jekyll-s3 to push to the subdir? (I realize that I may be able to get around this by telling Jekyll to write the files for the second blog into /subdir, but I haven't really looked into that yet.)

laurilehmijoki commented 11 years ago

At the moment, no.

Out of curiosity, why would you want to host two different Jekyll blogs on the same S3 bucket?

jblanton commented 11 years ago

Ah, OK, thanks for getting back to me.

To answer your question, I'll be running a blog at domain.com and a photoblog at domain.com/photos, each styled, etc., differently.

adelevie commented 11 years ago

You'd want something like this?

s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
s3_bucket: your.blog.bucket.com
s3_bucket_directory: /photos

There could be something under the hood where "s3_bucket_subdirectory" simply defaults to "/" if nil?.

laurilehmijoki commented 11 years ago

Not a bad idea.

adelevie commented 11 years ago

So, @jblanton, maybe you could propose some code for how this should work? Either a high level description, a PR, or just some failing specs would be great.

I think as config options increase, we should also focus on solving https://github.com/laurilehmijoki/jekyll-s3/issues/37. For example, right now we have different classes responsible for their own default values. Perhaps, we should have a Jekyll::S3::Configuration class which handles defaults.

adelevie commented 11 years ago

Also, I'll +1 this. I could use this feature right about now.