#blog

Start a New Blog, Again

This is my first post here.

GitHub logo

I decided to build a blog using Hugo, again.

Yes, a long time ago I built a blog, but I abandoned it and didn't update it for a very long time. Why not create another one to note down my learning journey?

  1. Install Hugo:
    brew install hugo
  2. Check and verify the Hugo version:
    hugo version
  3. Initialise a git repository (skip this if you don't intend to host your blog on GitHub):
    git init
  4. Download a theme. I chose Dream:
    cd themes
    git clone https://github.com/g1eny0ung/hugo-theme-dream.git dream
  5. Alternatively, add the theme as a submodule (from the official docs):
    git submodule add https://github.com/g1eny0ung/hugo-theme-dream.git themes/dream
  6. Add some content. Creating my first post:
    hugo new posts/my-first-post.md
  7. Start the Hugo server locally. It can be accessed at localhost:xxxx, where xxxx is the port number:
    hugo server -D
  8. If you want to host your blog on GitHub, push it:
    git add .
    git commit -m "my first commit"
    git remote add origin https://github.com/ftchen93/ftchen93.github.io.git
    git push origin master
  9. You're all set. After all those commands you should be able to view your blog on GitHub (or locally). For example, my blog URL is:
    https://ftchen93.github.io

Spoiler: I wasn't quite all set. See the follow-up post for the step I missed.