___|  _ \   |  |    |   |_ _|\ \     / ____|
 |     |   |  |  |    |   |  |  \ \   /  __|
 |   | |   | ___ __|  ___ |  |   \ \ /   |
\____|\___/     _|   _|  _|___|   \_/   _____| 

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

如何用github搭建专属域名的网站 | How to build a website with binding domain on github

BY: @alanzheng | CREATED: Jan. 24, 2018, 1:58 p.m. | VOTES: 17 | PAYOUT: $0.42 | [ VOTE ]

What Will I Learn?

可以学到什么?

Requirements

学习要求

Difficulty

难以程度

Tutorial Contents

教程内容

git clone https://github.com/AlanZheng/alanzheng.github.io.git




Hello github page


git add index.html
git commit -m "add index.html"
git push

输入github的用户名和密码即完成推送
- 在浏览器的地址栏输入alanzheng.github.io即可看到index.html的内容:
[IMAGE: https://res.cloudinary.com/hpiynhbhq/image/upload/v1516800470/dbvj8mptld4zebujbptw.png]
- 在域名注册商处注册域名,比如我注册的域名:alanzheng.top,并且添加如下A记录
[IMAGE: https://res.cloudinary.com/hpiynhbhq/image/upload/v1516801041/jezauxhvkw8yuoo2xxkl.png]
上图中的ip地址可以通过ping alanzheng.github.io获取:
[IMAGE: https://res.cloudinary.com/hpiynhbhq/image/upload/v1516801149/wdyxf3gjccogechubtzb.png]
- 将域名和网站绑定
在本地仓库alanzheng.github.io中新建文件CNAME,输入内容为注册的域名。比如:alanzheng.top
[IMAGE: https://res.cloudinary.com/hpiynhbhq/image/upload/v1516802068/e0tndfdyxkewjvpzeajw.png]
用上面添加index.html的方法将GNAME文件推送到github仓库。
- 测试网站:
在地址栏中输入注册的域名alanzheng.top,即可访问到自己的主页:
[IMAGE: https://res.cloudinary.com/hpiynhbhq/image/upload/v1516801730/zqjkvj9fklhj8jx4cgti.png]

Posted on Utopian.io - Rewarding Open Source Contributors

TAGS: [ #utopian-io ] [ #cn ] [ #blog ] [ #tutorial ] [ #site ]

Replies

@sayedanzi | Jan. 24, 2018, 4:28 p.m. | Votes: 0 | [ VOTE ]

Nice post !!! Check my profile to

@manishmike10 | Jan. 25, 2018, 1:09 p.m. | Votes: 0 | [ VOTE ]

Your contribution cannot be approved because it does not follow the Utopian Rules.
* Invalid Repository. This is made by you.
You can contact us on Discord.
[utopian-moderator]

@alanzheng | Jan. 25, 2018, 1:21 p.m. | Votes: 0 | [ VOTE ]

@manishmike10, thanks for review!
Because I cannot find suitable repository on github for this. So I created one.
Can you give some suggestions which repository on github I should use for this?

@manishmike10 | Jan. 26, 2018, 1:40 a.m. | Votes: 0 | [ VOTE ]

You cannot creat your own repo for contribution purpose.

@alanzheng | Jan. 26, 2018, 3:43 a.m. | Votes: 0 | [ VOTE ]

@manishmike10, thanks for reply!
I created the repo is not only for contribution purpose, I actually want to migrate my blog to there. Maybe as you know, github page only support static website. I am studying how to support whole website include database or something.

For this tutorial, I really cannot find suitable existing github repo for this. So I have to create my own. If it really disrupts the Utopian rule, sorry for that.
Thanks you again!

@justyy | Jan. 25, 2018, 11:48 p.m. | Votes: 0 | [ VOTE ]

github 上能跑 PHP么?还是只能是静态页面?

@alanzheng | Jan. 26, 2018, 1:52 a.m. | Votes: 0 | [ VOTE ]

不能跑服务端代码,只能是前端代码

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>