GitHub<免费的域名使用>
2020-05-08 本文已影响0人
誰在花里胡哨
需求:
之前有用过阿里云的,不过需要自己花钱买服务器和域名,所以说后来用不到时也就不想续费了。但是突然发现找工作或者想有一个自己的主页时,有感觉很需要。
~~~ 想在码云上使用免费的域名,可 参考此篇文章 ~~~
于是,就找到了 GitHub 这个东西( ~~ 是个程序员的都知道👌,所以就不说怎么注册啥的)
🎈这里的Repository name 有且只能起一个名字,才能变成你的域名 。只能起 [你的github账号名].github.io,以后就可以用 [你的github账号名].github.io 这个网址来访问你的网站啦。
注意:(你也可以给Repository起其他名字,那这个repository就是一个普通的存放内容的文件夹,没有网站的功能。)
使用步骤:

选择 public,否则无法外部访问




🎈项目代码提交的这种方式,是采用开发时的步骤来的,具体不太理解的,也可以参考 此篇文章,采用其他方式
🎈然后直接往里面放入打包好的代码,最后用 git 提交下代码,直接访问 https://sunwenxu1997.github.io/ 就可以了,若要更替项目的话,也只需要替换掉之前的代码,之后再重新提交就可以了。👍
(本人是用Vue打包的项目,放上去之后 github 是会自动构建的)
