1. 在github上注册新用户

进入网站 http://github.com/ 完成注册。 具体过程略。

假设你注册的用户名是: abc1235678

2. 使用新注册的用户名登陆github

具体过程略。

3. 在github上建立一个仓库

名称为 username.github.io

其中的username使用你所注册的用户名abc123来替代。

建立新仓库,其名称是: abc1235678.github.io

https://github.com/new

注意: 仓库名称的第一部分一定要与你的用户名称相同,否则静态博客在github上是不会工作的。

4. 安装git命令行工具

无论是在windows或者linux下,可安装git客户端工具。 具体过程略,可百度查询安装方法。

5. 克隆仓库

进入到你想保存项目的目录中,然后执行以下命令:

  `$ git clone https://github.com/abc1235678/abc1235678.github.io`

6. 建立一个首页文件

6.1 进入克隆得到的目录

  `$ cd abc1235678.github.io`
  `$ echo "Hello World" > index.html`

6.2 向仓库提交文件

  `$ git add --all `
  `$ git commit -m "first file."`
  `$ git push`

注意: 如果提示输入用户名、密码,输入即可。另外提交之后github上要等待10分钟左右,你所做的改变才会生效。

7. 查看你的博客内容

打入以下网址: http://abc1235678.github.io

8. 使用gor打造静态博客

gor的网址是: https://github.com/wendal/gor

里面有详细的安装说明及使用说明。 此处略。



blog comments powered by Disqus

Published

2014-08-14

Categories


Tags