Skip to main content
  1. All Posts/

How I Built My Personal Blog?

·543 words·3 mins·
Aaron
Author
Aaron
I only know that I know nothing.
Table of Contents

Preface
#

It seems like every year there are discussions about whether it’s still necessary to have your own blog. It’s a valid question. It’s 2022 now, and there are plenty of mature writing and publishing platforms available. For me, they have their pros and cons. While they make it easy to write and publish, they also come with various limitations.

I started blogging in 2015, using free hosting to deploy my first website. In 2017, I bought my first server, discovered the Typecho1 blogging system, and purchased the Handsome2 theme. In 2018, I moved to WeChat Official Accounts. With five posts per week, no ads, and high quality content, I attracted a decent number of readers. I was full of enthusiasm back then, kept it up for three years, and wrote over 700 articles. Over time, I realized it was a platform with many restrictions. Combined with Tencent’s various antics, I deleted it in 2021.

Now I’ve decided to restart my blog. Since deleting my WeChat account in 2021, I’ve become increasingly depressed. I don’t have many friends, and I rarely reach out to them unless necessary. I realized I was gradually losing my ability to express myself. That’s not a good thing. So I want to try to find that enthusiastic version of myself again through writing.

Choosing a Platform
#

There are two types of blogs: dynamic blogs and static blogs.

Dynamic blogging platforms I’ve used:

Static blogging platforms I’ve used:

These are all great blogging platforms, each with its own strengths and weaknesses. Dynamic blogs are feature-rich and beginner-friendly, but require server and database maintenance. Static blogs are lightweight and easy to deploy, but relatively limited in functionality.

Getting Started
#

After trying various blogging platforms, I chose Hugo this time. You can find installation instructions for four common operating systems on its official website3.

Creating a Site
#

In Hugo, the command to create a website folder is hugo new site <site-name>. For example, here I create a blog folder named Blog.

hugo new site Blog
cd Blog

Now you can enter hugo server to access the default generated webpage.

hugo server

Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Installing a Theme
#

Hugo has many great themes available at https://themes.gohugo.io. The theme’s GitHub repository or demo site usually has installation and configuration instructions.

Writing Articles
#

You can create a new article named Hello World with the following command:

hugo new posts/hello-world/index.md

hugo server -D

You can then visit http://localhost:1313/posts/hello-world to view it. You might notice the -D flag in the start command. This parameter allows you to preview drafts. New articles are set to draft: true by default. Unless you manually change true to false, the article won’t be visible in local preview or after publishing.

Hugo uses Markdown4 markup language for writing articles, which takes about 10 minutes to learn.

Deployment
#

Hugo can be deployed in many places. The official website has deployment tutorials5, many of which are free and have a very low barrier to entry. I think hosting on GitHub Pages and Cloudflare Pages is the most convenient option.