很多人注册了Github却不知道Github有一个巨大的福利,那就是你有了一块永久免费的放置静态网页的空间——Github Pages,借用这个空间就可以实现零成本建站。
Github Pages的使用步骤如下
- 建立仓库(使用你的github用户名替换下面的“username”):
username.github.io
- clone该仓库
git clone https://github.com/username/username.github.io
- 添加index.html
cd username.github.io
echo "Hello World" > index.html
- 提交
git add --all
git commit -m "Initial commit"
git push -u origin master
- 完成!
https://username.github.io.
有时候可能要等一会才会出现你的静态网页,也可以试试
https://username.github.io.git/index.html