How I Built This Site, From Scratch to Launch 🔧
The tools and steps behind this personal site.
How I Built This Site, From Scratch to Launch 🔧
Here’s how I set up this site, so I have a reference when I need to maintain it and anyone building a personal site has somewhere to start. 📝
Choosing the tools 🧐
- Hosting: GitHub Pages. It’s free, stable, and supports a custom domain.
- Static site generator: Jekyll. GitHub Pages supports it natively, so I don’t need a separate server.
- Theme: Chirpy. It comes with light and dark modes, tags, categories, archives, full-text search, and PWA support. That’s a good fit for a personal profile and blog.
Setting up the site 🛠️
- Get the official Chirpy starter template into a local repository.
- Edit
_config.ymlto set the site title, timezone, avatar, social links, and deployment URL. - Write
_tabs/about.mdfor the About page and put blog posts in_posts/. - Preview locally with
bundle exec jekyll s. - Push to GitHub. The repository includes
.github/workflows/pages-deploy.yml, which builds and publishes the site after a push.
How I publish a post ✍️
From here on, posting takes three steps. These are the commands I keep for reference (the comments are in Chinese):
1
2
3
4
5
6
7
8
9
10
# 1. 在 _posts/ 下新建一个 markdown 文件,命名格式:
# YYYY-MM-DD-标题.md(front matter 里写 title/date/categories/tags)
# 2. 本地预览确认效果
bundle exec jekyll s
# 3. 提交并推送,网站自动更新
git add .
git commit -m "add new post"
git push
A few things that tripped me up ⚠️
- A direct connection to GitHub can be unreliable. If cloning or pushing fails, try again or switch to SSH.
- The date in the post’s filename is its publication date. If it’s wrong, the post may be skipped.
- I keep images in
assets/img/and use relative paths to reference them.
I’ll add more here when I find other things worth trying. 🚀
This post is licensed under CC BY 4.0 by the author.