将根目录更改为github页面 [英] Change the root directory to github pages

查看:76
本文介绍了将根目录更改为github页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用架构创建项目:

| _ Source

| _ Build

  | _index.html

添加的分支:git subtree push --prefix build origin gh-pages

我将此分支作为github页面的源,但在以下链接上找不到该页面:

I put this branch as a source for github pages, but can not find the page on the following link:

YourName.github.io/RepoName

仅找到以下链接:

YourName.github.io/RepoName/index.html

由于链接不正确,脚本无法正常工作,样式和图像未加载.

due to incorrect links are not working scripts, styles and images are not loaded.

推荐答案

我刚遇到这个问题,这就是我的解决方法:克隆到您创建的名为 USERNAME.github.io 的存储库中(用户名是您的github帐户名),应该这样做.祝你好运!

I just ran into this and this is how I fixed it: clone into a repository that you create named USERNAME.github.io (username is your github account name) and that should do it. Good luck!

这篇关于将根目录更改为github页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆