详细的可以看:https://pages.github.com/

1. 注册github

访问https://github.com/,按照提示注册属于自己的github账号。

2. Create a repository

第一步:登录自己的github账号后,点击右上角的”+”号,选择”New repository”。

第二步:新的repository的命名格式是username.github.io,其中,username是你注册github的用户名。

第三步: 点击创建按钮。可以获得自己的repository地址

eg: https://github.com/mollywml/mollywml.github.io.git

3. 在linux下terminal操作(以我自己的用户名mollywml为例)

第一步: 打开linux控制台,准备工作

# yum install git

第二步: clone你自己的repository

# git clone https://github.com/mollywml/mollywml.github.io.git

第三步: 进入目录, 编写一个简单的index.html文件

# cd mollywml.github.io/
# echo "Hello World" > index.html

第四步:向自己的gitbub提交修改

# git add --all
# git config --global user.name "mollywml"
# git commit -m "Initial commit"
# git push -u origin master
@ Username for 'https://github.com':  (输入登录github的账号名)
@ Password for 'https://xxxxx@github.com':(输入登录github的密码
4. 使用浏览器登录自己的博客查看

博客地址是http://username.github.io

其中 username为自己的用户名

Logo

免费领 200 小时云算力,进群参与显卡、AI PC 幸运抽奖

更多推荐