通过GitHub Pages创建个人主页
首先看图~
![](https://i-blog.csdnimg.cn/blog_migrate/bc3da6ffa84416caa46102af8a00fff4.webp?x-image-process=image/format,png)
01.png
![](https://i-blog.csdnimg.cn/blog_migrate/da69d1990f74888c828233305e4ff436.webp?x-image-process=image/format,png)
02.png
写入名字, 这里要以 github.io做后缀, 不然创建出来的不是GitHub Pages
![](https://i-blog.csdnimg.cn/blog_migrate/1cb06420f6f67e46bf5db63c66dddbf2.webp?x-image-process=image/format,png)
03.png
![](https://i-blog.csdnimg.cn/blog_migrate/ac5f1dcbaf4eaf2fd3141f8851704fab.webp?x-image-process=image/format,png)
04.png
我也是做到这一步才发现如果设置的名字不是github的用户名就会是这样的, 嘛~ 就这样继续往下做好了~
![](https://i-blog.csdnimg.cn/blog_migrate/faf20c168703f1dc573975ebf4911ddc.webp?x-image-process=image/format,png)
05.png
继续下一步
![](https://i-blog.csdnimg.cn/blog_migrate/96822dc957d88358c4f37919a353c0fd.webp?x-image-process=image/format,png)
06_Body.png
选择一个页面样式
![](https://i-blog.csdnimg.cn/blog_migrate/43bb03d8dd0b119de4ff81f41bdcf7c2.webp?x-image-process=image/format,png)
07.png
这样就完成了页面创建, 访问地址获得的就是之前设置的样式, 细看此时的内容就是页面编写图(往上2个Body图)的内容
这时我想到的是…, 那你好逗~ 原来一些开源项目提供的下载页面是这样做的
![](https://i-blog.csdnimg.cn/blog_migrate/dc68651877ee9bfa543d55d746436aab.webp?x-image-process=image/format,png)
08.png
接着我push本地写好的HTML项目, 发现内容还是原来设置好的页面样式, 好吧… 或许这样的做法是行不通的
所以...创建的时候需要"自己的github用户名+.github.io", 步骤一样, 创建好后来到设置页是这样的, 不用再进行下一步
![](https://i-blog.csdnimg.cn/blog_migrate/6fa0907434118799ae74bd24008ae717.webp?x-image-process=image/format,png)
09.png
接着选择Code选项卡
![](https://i-blog.csdnimg.cn/blog_migrate/8f783c38a1e10c03fe2dca265be73409.webp?x-image-process=image/format,png)
10.png
打开终端, cd到自己想要的文件夹后clone到本地
git clone https://github.com/username/username.github.io
进入这个项目文件夹
cd username.github.io
把写好HTML项目拷贝到username.githu.io目录下
![](https://i-blog.csdnimg.cn/blog_migrate/a099af122e65604c65b53269c7373460.webp?x-image-process=image/format,png)
11.png
添加当前所有文件
git add .
提交到本地
git commit -m'首次提交'
push到主分支
git push -u origin master
完成后到浏览器访问到的就是自己写好的HTML页面了(https://larms.github.io), 这样就可以用HTML的方式写自己的博客了
![](https://i-blog.csdnimg.cn/blog_migrate/f465691c03dc01a2c058c22345c2d535.webp?x-image-process=image/format,png)
12.png