How i setup this blog
I used WordPress for my daily IT blog for a long time. It worked well, but over time I realized it required more maintenance than I actually needed. All I wanted was a simple website to share my thoughts — not a full-featured platform with complex systems behind it.
Recently, I came across a few well-structured blogs and got curious about how they were built. After some research, I discovered Jekyll — a Ruby-based static site generator.
How It Works
Traditionally, blogs rely on a database to manage posts. Jekyll, however, is completely database-free. It’s a file-based system where you follow a predefined structure.
There are two main parts:
- You define the structure and content
- Jekyll generates static HTML pages based on that structure
Jekyll uses Markdown, which makes writing content simple and efficient.
How I Got Started
Since I wanted a simple and portable setup, I decided to run Jekyll using Docker.
Why Docker?
- Easy to move around
- Everything lives in a single folder
- No need to worry about dependencies or complicated setup steps
- Just copy the folder to a new machine and run it
Here’s how I set it up:
1
2
3
4
mkdir myblogspot
cd myblogspot
git clone https://github.com/cotes2020/jekyll-theme-chirpy.git
nano docker-compose.yml
This is my docker-compose.yml
1
2
3
4
5
6
7
8
9
10
services:
jekyll:
image: bretfisher/jekyll-serve
container_name: myblog
restart: always
ports:
- "4000:4000"
- "35729:35729"
volumes:
- ./jekyll-theme-chirpy:/site
Then i run this
1
docker compose up
Once everything looks good, press Ctrl + C to stop it. Then restart it in the background so it keeps running:
1
docker compose up -d
How do i update it?
Start by editing the _config.yml file. This is where you configure basic information like your name, blog title, and other settings.
I updated it, but it’s not updated on my blog when i refresh
Remember the two parts: your source files and the generated site.
The actual site that users see is built into the _site folder. This folder only updates when the site is rebuilt.
To apply your changes, you need to restart the container:
1
docker compose restart
How to add a new post
The default setup includes example posts to guide you.
To create a new post:
- Go to the _posts folder
- Add a new Markdown file following the naming convention
What to remember?
You have to restart the container everytime you update your blog. The restart is just within a few seconds, hardly see any down time.
1
docker compose restart