When I initially decided to create a blog, I took some time to figure out what to build it on. I wanted something cheap, fast, and customizable. I explored common alternatives such as wordpress, blogger, amongst others. For a time, I highly considered using Github pages. In the end, I decided to use Jekyll to organize the blog and AWS to host it as I am very familiar with the platform.

Here are the basic steps you can follow to create:

1) Open up your AWS account and create a new Cloud9 environment.

2) Open up the new environment and once inside, open a new terminal.

3) Set-up a new serverless project by running the following:

npm i -g serverless
serverless // create your "QuickBlog" project
cd QuickBlog
npm install --save serverless-finch
mkdir -p client/dist

4) Add following to bottom of serverless.yml:

plugins:
  - serverless-finch

custom:
  client:
    bucketName: <your-unique-s3-bucketname-for-the-quick-blog>
    errorDocument: 404.html

5) Set-up Jekyll:

gem install jekyll bundler
jekyll new myBlog
cd myBlog

6) Add following to end of _config.yml :

port: 8080 (By default, Cloud9 only allows previewing applications on this port)

7) Manage Jekyll Content:

  • Add following to end of gemfile: gem 'jekyll-admin', group: :jekyll_plugins

  • Run the following:
    bundle install
    jekyll serve
    
  • Now, go to localhost:8080/admin and manage your content (posts and pages)

8) Deploy by running the following:

cp -r _site/* ../client/dist
cd ..
serverless client deploy

9) Anytime you need to change anything you can do the following:

  • First jekyll serve to get to the admin pages
  • Then Step 8 to Deploy

Special thanks to: