5

Github Pages常见问题一览

 3 years ago
source link: https://jw1.dev/2020/07/07/a01.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Github Pages常见问题一览

This article might contains outdated or misleading contents due to it is tagged as "Deprecated" by its author.
👨‍💻 2020-07-07

使用Github Pages作为我博客的host server已经有一段时间了,初期使用中遇到了不少问题,今天就来和你们分享一下。

已经提交changes,但是没有立刻开始构建

根据Github的官方文档,第一次构建pages大概需要10分钟,但是很多时候我们并不是第一次构建了,而且即使过了十分钟后,pages也还是没有开始构建,就很令人着急。后来在一个issue(惭愧,找不到页面了)下面找到了问题的答案:

随便选择一个Github pages主题,即使你不使用Jekyll。

image-20200707100136926

选择完成后会在你的根目录创建一个_config.yml文件,这样以后每次提交都会立马开始自动构建了。不过理论上来说没有这个config文件也是可以构建的,只是不知道是github把构建优先级降低了还是概率性的忽略了。

配置好了自定义域名,但是username.github.io没有跳转到我设置的域名

这是因为你的repo名称没有设置为username.github.io,是的,就是这么简单。而且不正确的repo名称还会影响你的其他pages:

假设你创建另一个repo – your_new_repo,并给它开启了pages,理论上来说可以直接访问username.github.io/your_new_repo,但是如果你没有正确配置你的一级repo名称,这个url将会是404。解决方法也有,就是配置另一个域名。。。

当然,只要你爱折腾,不改也无妨。


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK