两分钟急速创建一个Github Page【绑定个人域名】
2016-12-13 15:35
330 查看
想要拥有一个个人的网页,而且还想绑定自己个性域名的网页,又不想花钱买服务器,那你找对地方了,今天让你两分钟拥有一个自己的网页。
github项目地址
演示网站
以一个前端网站收藏夹为例。demo地址:http://collect.sofar.top
2: 你要有github 账户(废话);
我这边选择的是 collect.sofar.top
![](http://upload-images.jianshu.io/upload_images/2280447-2cca8f1af2b53169.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
然后点击保存 这样 collect.sofar.top 域名DNS就解析成功了。
![](http://upload-images.jianshu.io/upload_images/2280447-f4291d07cd38f977.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
git clone 到本地
创建index.html文件写入内容
![](http://upload-images.jianshu.io/upload_images/2280447-744322112e7990ec.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
提交到github
![](http://upload-images.jianshu.io/upload_images/2280447-0ebbe6b06f04b32d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](http://upload-images.jianshu.io/upload_images/2280447-ddac5d4a03af10ee.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](//img-blog.csdn.net/20180322144916999?watermark/2/text/Ly9ibG9nLmNzZG4ubmV0L3FxXzE2ODYzNTU1/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)
记得保存
下一步就是:
![](http://upload-images.jianshu.io/upload_images/2280447-eb925106b8dcf95d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
往下拉找到Github Page
![](//img-blog.csdn.net/20180322144937501?watermark/2/text/Ly9ibG9nLmNzZG4ubmV0L3FxXzE2ODYzNTU1/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)
选择 master:branch 记得点击 save 保存哦;
保存后你设置的域名会自动填入下面Custom domain的输入框中
接下来就是见证奇迹的时刻
访问你设置的域名,显示出来的是你写入的显示内容
![](//img-blog.csdn.net/20180322145014967?watermark/2/text/Ly9ibG9nLmNzZG4ubmV0L3FxXzE2ODYzNTU1/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)
现在你就可以往你的页面里面写上你炫酷叼炸天的页面效果了。
github项目地址
演示网站
github项目地址
演示网站
以一个前端网站收藏夹为例。demo地址:http://collect.sofar.top
项目前准备
1: 你要有一个域名(废话);2: 你要有github 账户(废话);
域名解析
创建一个你喜欢的二级域名。我这边选择的是 collect.sofar.top
![](http://upload-images.jianshu.io/upload_images/2280447-2cca8f1af2b53169.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
然后点击保存 这样 collect.sofar.top 域名DNS就解析成功了。
准备网页
在github 上创建一个仓库![](http://upload-images.jianshu.io/upload_images/2280447-f4291d07cd38f977.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
git clone 到本地
创建index.html文件写入内容
![](http://upload-images.jianshu.io/upload_images/2280447-744322112e7990ec.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
提交到github
![](http://upload-images.jianshu.io/upload_images/2280447-0ebbe6b06f04b32d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
github 项目设置
创建CNAME文件![](http://upload-images.jianshu.io/upload_images/2280447-ddac5d4a03af10ee.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
记得保存
下一步就是:
![](http://upload-images.jianshu.io/upload_images/2280447-eb925106b8dcf95d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
往下拉找到Github Page
选择 master:branch 记得点击 save 保存哦;
保存后你设置的域名会自动填入下面Custom domain的输入框中
接下来就是见证奇迹的时刻
访问你设置的域名,显示出来的是你写入的显示内容
现在你就可以往你的页面里面写上你炫酷叼炸天的页面效果了。
github项目地址
演示网站