laurilehmijoki / jekyll-s3

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

Add config option to ignore certain files #31

Open BewhiskeredBard opened 11 years ago

BewhiskeredBard commented 11 years ago

I have another system that frequently pushes JSON data files to the same S3 bucket that's hosting my jekyll website. My jekyll website makes AJAX calls to retrieve this data.

I have local sample versions of these JSON data files on my machine (for testing), but every time I run jekyll-s3, my local files get uploaded and replace the production ones. If I could somehow define a set of ignored files in _jekyll_s3.yml, it would be a huge help.

pathawks commented 11 years ago

I would love to have jekyll-s3 ignore the dreaded .DS_Store files.

laurilehmijoki commented 11 years ago

It's already possible to define a regex for ignored files: https://github.com/laurilehmijoki/jekyll-s3#ignoring-files-you-want-to-keep-on-aws.

Does that feature solve your problem?

pathawks commented 11 years ago

It's already possible to define a regex for ignored files

Is there any way to define the opposite: Files I want to keep on my local machine, but not on S3?

laurilehmijoki commented 11 years ago

Currently there is no such way.

A regex ignore_on_local in _jekyll_s3.yml could do the job. Only the implementation is missing!

brajeshwar commented 11 years ago

Is this the work of Jekyll itself and not Jekyll-s3. Exclude whatever you want to in your Jekyll config. Everything there will be local but won't be in your "_site" which is what Jekyll-S3 delivers to your S3.

laurilehmijoki commented 11 years ago

Good point @brajeshwar. In deed with the exclude setting of Jekyll you can control the files that end up in the _site directory.