Part 1: The Basics of Building a Hugo Blog with AI

No.
166
Date
Read
4 min
Words
882

My blog's address: luix.blog

Come take a look.


Why Build a Blog

I only got the idea of building my own blog at the end of last year. I was born after 2000, and the concept of a blog showed up when I was very young. For the next ten-plus years, I barely saw it again.

What I didn't know was that over my life online, I'd probably clicked into other people's blogs countless times without realizing it.

What is a blog? I don't want to explain the technology behind it. I just want to tell you how I understand blogs now.

To me, a blog is my world.

It exists online as a web address. In theory, as long as you don't tell anyone the address, nobody can get into your world.

And in a blog, I can keep anything I want to put in it. Unlike platforms like Xiaohongshu or WeChat Official Accounts, a blog is more private (up to you) and more secure. When I first wanted to build my own blog, it was mainly for two reasons.

  • Having my own web address would look cool (it really does)
  • Having a place outside social media to keep my writing and show my taste.

With those two goals in mind, I started tinkering.

How My Blog Evolved

Third-Party Platforms

After many years of development, blogging actually has a very mature ecosystem. Once you get into it, you find that lots of people have blogs, especially outside China. Many successful people who are well known in their fields write blogs to share their latest thinking and experiences.

There are also lots of ready-made platforms for building a blog. People who aren't familiar with programming can use them to set up, manage, and publish a blog quickly.

That's how I started too. I moved between two platforms:

  • WordPress
  • Bear Blog

The advantages of platforms like these are obvious:

  • Easy to set up. Fill in a little information and you have your own blog.
  • Easy to manage. Publish, edit, and delete your posts in one integrated app.
  • Lots of themes. There are plenty of ready-made themes to choose from.
  • In short: convenience

The disadvantages are just as obvious:

  • You can't use your own domain. These platforms usually add their own name to your domain to promote themselves. If you want a custom domain, you have to pay a few coins. Generally, the better the domain you want, the more it costs, and you pay in US dollars every year
  • You can't design your site your own way. There are lots of themes, but most look the same. Even where you can design things yourself, the tools have a steep learning curve and aren't convenient.

So starting from what I needed, third-party platforms clearly weren't right for me.

  • First, I didn't want to spend much on a blog.
  • Second, I wanted my blog to show my taste. I wanted to be deeply involved in designing every detail.
  • Third, I wanted my own domain.

So after leaving Bear Blog, I officially set off on my own path of tinkering. That's the second way to build a blog: building one yourself, based on a local library of files.

Hugo and GitHub

First, let me explain what a blog built on Hugo and GitHub is.

A blog means putting your content online so people can see it. The key parts are:

  • Uploading your local content to the internet.
  • Letting people see it.

Hugo and GitHub handle those two jobs.

  • Hugo is a static site generator. You just write your posts in Markdown, and Hugo turns them into web pages.
  • GitHub here means GitHub Pages. It hosts your code repository for free and turns it into a website people can visit.

So Hugo plus GitHub works like this: you write a post in Markdown on your computer, Hugo turns it into a web page, and you push that page to a GitHub repository. GitHub Pages then deploys the repository to its website automatically, and anyone in the world can visit it.

This approach has a few advantages:

  • It can be completely free. Hosting, the default domain, and traffic cost nothing.
  • The writing experience: you write in Markdown, the best syntax in the world.
  • It's fast.
  • You can use a custom domain. My current domain is custom, for example, but you have to get the domain yourself first.

The disadvantages are just as obvious:

  • There's a learning curve: you have to learn basic command-line operations and Git
  • Any extra feature takes tinkering: things like comments or a membership system all need third-party services.
  • Design takes code: if you want to be deeply involved in designing your blog, you need to know HTML and CSS.

Now my blog is up and running on this setup, and I really like the design.

But here's the question. I can't read a single line of code or write one. How did I start from zero and build a blog like this?

Along the way, I got past roughly these problems:

  • I didn't know how to use Vercel
  • I didn't know how to use Cloudflare
  • I didn't know how to buy a domain
  • I didn't know how to configure DNS
  • I didn't know how to push posts
  • I didn't know how to switch themes

Licensed under CC BY-NC 4.0. Please credit the author and link to xiluluke.com/en/166

Xiluluke

A dialectical minimalist writing about life, reading and thinking.

Comments

0 / 2000Plain text · Line breaks preserved
Comment as

Loading comments…

    Your browser remembers your name and email once you post.

    Related writing

    WeChat · Xiluluke

    WeChat QR code for Xiluluke

    Scan with WeChat, or long-press to save the image.

    Open original ↗

    Buy me a coffee · Xiluluke

    WeChat reward code for Xiluluke
    WeChat
    Alipay code for Xiluluke
    Alipay

    Scan with WeChat or Alipay, or long-press to save the image.