GitHub Pages + Jekyll + Chirpy Jekyll Theme 搭建博客
GitHub Pages + Jekyll + Chirpy Jekyll Theme 搭建博客
GitHub Pages + Jekyll + Chirpy Jekyll Theme 搭建博客。
GitHub Pages默认支持Jekyll,但Chirpy主题不是Jekyll默认支持的,需要通过Chirpy模板创建仓库。
创建Github仓库
克隆Chirpy模板
打开网站:https://github.com/cotes2020/chirpy-starter
点击 Use this template,后选择Create a new repository。
仓库名=你的用户名.github.io
克隆Github仓库到本地
克隆新创建的仓库
1
git clone git@github.com:caohongchuan/caohongchuan.github.io.git
修改基础配置
修改_config.yml文件
打开_config.yml,修改以下内容
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Change to your timezone › https://zones.arilyn.cc
timezone: Asia/Shanghai
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
# ↓ --------------------------
title: Cao Hongchuan Blog # the main title
tagline: Coding Blog # it will display as the subtitle
description: >- # used by seo meta and the atom feed
Blog with Github Page, Using jekyll and chirpy theme.
# Fill in the protocol & hostname for your site.
# E.g. 'https://username.github.io', note that it does not end with a '/'.
url: "https://caohongchuan.github.io"
github:
username: caohongchuan # change to your GitHub usernam
写一篇文章
文章放在_posts/目录下,文件的命令规则是YYYY-MM-DD-title.md
如创建_posts/tutorial/2026-05-01-blog.md,文件开头包含yml配置信息:
1
2
3
4
5
6
7
8
9
10
11
---
title: GitHub Pages + Jekyll + Chirpy Jekyll Theme 搭建博客
date: 2026-05-02 16:00:00 +0800
categories: [tutorial]
tags: [blog, github]
author: caohongchuan
pin: false
math: false
toc: true
comments: true
---
所有的文章都可以使用该模板。
推送本地仓库到Github
1
2
3
git add .
git commit -m "init blog"
git push
This post is licensed under CC BY 4.0 by the author.

