在GitHub提交的代码,如果想要在线预览页面,我们可以使用GitHub提供的GitHub Pages功能,以便向用户展示开源项目。
功能设置也比较简单,具体步骤如下:
1.登入 GitHub,新建一个 repo,设置如下:


也可直接选择已有仓库进行设置。
2.进入[setting]进行设置

3.找到GitHub Pages,开启 GitHub Pages 功能,得到一个「预览地址」

4.访问页面
得到http://username.github.io/repo/
,可直接预览到项目根目录下的index.html,其它文件内的页面在链接上加上文件路径即可访问。
以上就是GitHub Pagesde 的设置了,是不是很容易啊,想体验的小伙伴可以试试这个功能。
网友评论