<commit_before># s3-static-site

Allows static websites deployment to Amazon S3 website buckets using Capistrano.

## Hosting your website with Amazon S3

S3 provides special website enabled buckets that allows you to deliver website pages directly from S3.
The most important difference is that theses buckets serves an index document (ex. index.html) whenever a user specifies the URL for the root of your website, or a subfolder. And you can point your domain name directly to the S3 bucket cname.

To learn how to setup your website bucket, see [Amazon Documentation](http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?HostingWebsiteQS1.html).

## Getting started

Setup capistrano, create a public folder and set your S3 bucket configurations in `deploy.rb`.

    $ capify .
    $ mkdir public
    $ touch config/deploy.rb #see config instructions bellow
    $ cap deploy

### Configuring deployment

s3-static-site overrides the default Capistrano recipes for Rails projects with its own simple s3 publishing scripts.

    # config/deploy.rb
    require 's3-static-site'

    set :bucket, "www.cool-website-bucket.com"
    set :access_key_id, "CHANGETHIS"<commit_msg>Format description<commit_after># s3-static-site

> Allows static websites deployment to Amazon S3 website buckets using Capistrano.

## Hosting your website with Amazon S3

S3 provides special website enabled buckets that allows you to deliver website pages directly from S3.
The most important difference is that theses buckets serves an index document (ex. index.html) whenever a user specifies the URL for the root of your website, or a subfolder. And you can point your domain name directly to the S3 bucket cname.

To learn how to setup your website bucket, see [Amazon Documentation](http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?HostingWebsiteQS1.html).

## Getting started

Setup capistrano, create a public folder and set your S3 bucket configurations in `deploy.rb`.

    $ capify .
    $ mkdir public
    $ touch config/deploy.rb #see config instructions bellow
    $ cap deploy

### Configuring deployment

s3-static-site overrides the default Capistrano recipes for Rails projects with its own simple s3 publishing scripts.

    # config/deploy.rb
    require 's3-static-site'

    set :bucket, "www.cool-website-bucket.com"
    set :access_key_id, "CHANGETHIS"
{'fraction_non_alphanumeric': 0.06341873162536749, 'fraction_numerical': 0.01007979840403192, 'mean_word_length': 4.189542483660131, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3761737', 'n_tokens_mistral': 665, 'n_tokens_neox': 630, 'n_words': 284}