Giter Site home page Giter Site logo

dystatic's Introduction

Dystatic

Code Climate

Deploy your Jekyll/Nanoc/Blacksmith site to S3.

Features

  • Only uploads new/changed files
  • Deletes files no longer present locally
  • Adds appropriate headers for gzipped files
  • Cache control for static-static files

Installation

    git clone https://github.com/AlexanderEkdahl/dystatic.git
    cd dystatic
    gem build dystatic.gemspec
    gem install dystatic-0.1.0.gem

This gem is not on RubyGems yet because of the lack of tests.

Usage

  1. Go to the folder containing the source of your static site

  2. Create a file named _dystatic.yml containing:

     s3_id: YOUR_ACCESS_ID
     s3_secret: YOUR_ACCESS_SECRET
     s3_bucket: BUCKET_NAME
    
  3. Run dystatic deploy and it will deploy all of the contents from _site/

##Additional features

###Using non-standard AWS regions

By default, dystatic uses the US Standard Region but can be changed by passing the s3_endpoint setting

For example, if your bucket is in EU, add s3_endpoint: s3-eu-west-1.amazonaws.com to _dystatic.yml

###Custom source directory

Add source: YOUR_FOLDER to _dystatic.yml or use dystatic deploy -s [DIR]

###Deploying from your current folder

  dystatic deploy -s . --s3_id YOUR_ACCESS_ID --s3_secret YOUR_ACCESS_SECRET --s3_bucket BUCKET_NAME

For more settings use dystatic -h

Known issues

  • Gzipping files adds a timestamp. This timestamp may incorrectly lead dystatic into believing the file has changed. To fix this add the -n flag when gzipping.

TODO

  • Push tests(they are currently using private data)
  • Cloudfront invalidation
  • dystatic.yml erb support
  • Speed up etag retrieval aws/aws-sdk-ruby#84 with refinements
  • Refactor out S3 specific code and add SSH implementation
  • S3 Redirections
  • Route53
  • www bucket(maybe the www bucket is automatically configured to redirect the requests?)
  • Links in output
  • Hotlinking protection in policy
  • Customize index and error document

##Refactor

setup if setup_required? (bucket exist, folder exist) upload/delete md5 remote.upload syntax?

dystatic's People

Contributors

alexanderekdahl avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.