Jekyll Notes

I've been happy with Jekyll over the past few months and wanted to capture some notes how I've recently converted my deployment to use S3 static site hosting. Since Jekyll generates static content and S3 supports static html it seemed like a good way to cost effectively host a site.

Assemblage

Jekyll is a static html generator which parses simple markdown formatted text files and outputs html after running it. S3 supports delivery of static websites which makes it an ideal place to host a website inexpensively. Jekyll doesn't have native support for uploading to S3, another tool called s3_website is used to accomplish this task. The s3_website tool supports Jekyll sites out of the box and will automatically find the html site content and upload it to S3. Since Jekyll posts are just a collection of text files it makes some sense to use Git for versioning. Git can be leveraged with a post-commit hook to invoke Jekyll to build any new content and upload it to S3 with s3_website.

Below is a list of software which I needed to either install, configure or modify:

gem install pygments.rb # Syntax highlighting
gem install jekyll-compose # Easier post creation
gem install jekyll-paginate # Pagination support
  • Create an IAM user, S3 bucket and bucket policy.
  • Configure a Route53 alias record to point to your publicly available bucket URL.
  • Create IAM roles which grant bucket and object access.
  • Create an s3_website configuration file and edit it.
  • Create and configure a Jekyll site or use a nice template like Lanyon.
  • Initialize a git repository.
  • Configure a post-commit hook to deploy the site using s3_website push
  • jekyll post "Hello World"
  • Use 'jekyll serve' to test out the site.
  • Use 'jekyll build' and 's3_website push' to deploy to S3 in a post-commit hook.
  • Edit the site and commit the changes when satisfied.