How I maintain my blog

April 2017 ยท 1 minute read

I user a static site generator called hugo, and use Amazon S3 to host my html files.

I edit my text as markup, and put them in the appropriate folder structures. There’s the added bonus of being able to use git for revision control.

When it’s time to “compile” my webpages, I navigate to the directory and run

hugo

When I’d like to view it in my browser I run

hugo server -v

Open up the localhost link in my browser, usually

localhost:1313

I like to test it out and explore around, make sure it looks nice.

If it does, I copy the public directory to an Amazon s3 bucket. There are guides for installing the aws command line utility and hosting static sites on Amazon Here and Here respectively

My script for uploading to the S3 bucket

#!/bin/bash

echo -n "Posting Blog to S3!"

aws s3 cp ~/Documents/Blog/Liveblog/public s3://yourwebsitehere.com --recursive

echo -e "Site source posted to S3!"