博客升级到 chirpy theme
chirpy theme 确实很强大!
博客升级到 chirpy theme
修改模板
使用如下命令克隆 repo 到本地
1
git clone https://github.com/cotes2020/chirpy-starter.git
修改 _config.yml 文件内的配置信息,主要有
lang修改为zh-CNurl修改为https://<username>.github.iotitledescriptiontaglineavatar
本地预览
本地预览需先安装好
Docker Desktop和VS Code
- VS Code 安装
Dev Contaivers插件 - 打开目录,根据提示下载 Docker 镜像
- 容器启动后,可以在 VS Code 终端执行
1
2
bundle install
bundle exec jekyll serve --force_polling
或者在 windows 终端执行
1
2
3
4
docker exec -it <container_name> bash
cd /workspaces/kode4fun.github.io
bundle install
bundle exec jekyll serve -force_polling
部署到 github
需要先删除默认的
.github/workflows/pages-deploy.yml文件中branchs节多余的main分支
- 建立名字为
<username>.github.io的 repo - 进入
Settings->Pages,source中选择Github Actions - push 到 github
参考资料
本文由作者按照 CC BY 4.0 进行授权