The post describes my initiative of starting this website, how I built it using Hexo and AWS and maintain it on the day-to-day basis. This is also the very first offical post on my blog as well.

This post has been finished. No changes to be updated yet.

Why I Built it

Ever since I realized that I needed a website to write or share stuff, I have been search around for options to build one that would satisfy my need in following ways:

  • easy to maintain, which means more energy on writing.
  • rich in visual features, should be better than a boring notebook.
  • highly customizable, which means I can take the full control of my web design if I want to.
  • highly expandable, may able to support other services or applications in the long run.

I took notes in markdown mostly hence it would be so nice that I can write my notes directly using markdown and do the minor management over the website itself. I was so excited when I came across the Hexo frame and decided to give it a try immediately. In addition, I used AWS for hosting so as to benefit from its diverse ecosystem when I need to expand the scope of this website. Besides, it does not cost much at all.

How to Build it

There is already quite a few good posts out there describing how to create a blog or website using the combination of AWS and Hexo, I would rather save myself by directly referring to the helpful links.

I would particularly recommend Ted Yavuzkurt‘s notes here, which offers a 10000 Foot Summary to conquer this task. In my own words, my 10000 foot summary would be as following:

  1. Install Hexo on your computer.
  2. Build your ‘Hello World’ version website with Hexo.
  3. Register for AWS Free Tier.
  4. Install Hexo deployer plugin hexo-deployer-s3.
  5. Configure, deploy and host static website on AWS S3.
  6. Register a domain with AWS Route 53.
  7. Configure S3 to registered domain.
  8. Test the setup.
  9. Customize with other themes and add your staff!

In addition, Sven Flickinger has 4 step-by-step tutorials that are also very useful. I use Louis Barranqueiro’s theme Tranquilpeak which is free, elegant and rich in features, cannot appreciate it more!

How to Maintain

Writing a New Post

To create a new post, use following command line in terminal.

1
$ hexo new <post/page/draft> "Name of My New Post"

Hexo uses templates saved in scaffolds folder to generate corresponding layout.

More info: Writing

Check Changes and Deploy

To check changes locally, use following command line in terminal.

1
$ hexo clean && hexo g && hexo s <-p XXXX>

Indicates port to start up local server if needed.

To deploy to S3 bucket, use following command line in terminal.

1
$ hexo clean && hexo g && hexo d

More info: Generating, Server, Deployment

Practical Guide

Post Summary: Each post should have a short summary at the very beginning and end up this the syntax:

1
<!-- more -->

This will cut the post with an summary that would display on the home page.

Status Alert After the summary, an alert should be inserted indicates the status of the post. Description could be as following:

  1. success: This post has been finished. No changes to be updated yet.
  2. warning: This post has not yet finished. Further updates are coming soon.
  3. danger: This post might be deprecated or longer be accurate.

alert | highlight | images | wide image | tabbed code block | code block | block quote | pull quote | gist | youtube | vimeo | live demo check | theme user doc | markdown