Post

建立你的blog

Intro

使用chirpy来搭建一个简单的blog

Setup

从chirpy的github仓库fork一个仓库,命名为 $.github.io$ 运行一下命令来本地化

1
git clone https://github.com/yourusername/yourusername.github.io.git

从https://rubyinstaller.org/ 获取ruby/rubygem 以管理员身份在powershell中运行

1
2
gem install bundler
gem install jekyll

在仓库主文件夹下运行

1
2
3
bundle install
bundle exec jekyll serve
http://localhost:4000

更新内容

在仓库主文件夹下运行

1
2
3
git add .
git commit -m "Update content"
git push origin main

如果遇到

1
2
3
4
5
6
7
8
9
10
11
12
13
Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'lenovo@LAPTOP-NLMRKQ8R.(none)')
1
2
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

然后会让你登录,选择login with the code 出现

1
You've successfully authenticated, but GitHub does not provide shell access.

说明对了,不要慌

\[FINISHED\]
This post is licensed under CC BY 4.0 by the author.