I wanted to setup a few blogs quickly without the overhead of the Wordpress behemoth. Luckly Jekyll is just the tool for the job. If you are unfamiliar with Jekyll it is a static-site generator which allows you to develop your pages/posts as Markdown files and generate static sites from them.
Having gotten into the whole “minimal machine setup” mode recently I decided to use Jekyll by-way-of Docker and a combination of AWS CLI which allows me to just configure a nice script to build the site using Jekyll without having to install anything (except Docker of course)
The following build.sh script makes a couple of assumptions:
- You have an AWS config and credentials file sitting in ~/.aws
- You have cloned a default Jekyll site
- You have an s3 bucket entitled mysite.com
- You have a named credential setup mysite in your ~/.aws/credentials file
This build.sh file should be placed in your Jekyll site directory root:
And there you have it - you can make changes to your Jekyll directory and run
./build.sh to deploy it to your S3 bucket for static-site deliciousness!