简体   繁体   English

jekyll 页面构建失败

[英]jekyll page build failure

I'm new to web development, so please bear with me.我是网络开发的新手,所以请耐心等待。

I'm trying to create a website for a group project using Github Pages, and I have forked this repository .我正在尝试使用 Github Pages 为小组项目创建一个网站,并且我已经分叉了这个存储库 I've made several changes, and the website was up and running.我进行了一些更改,网站已启动并运行。 Today I updated some images and the website wouldn't build anymore.今天我更新了一些图片,网站不会再建立了。 I tried reverting to the previous commit, but it wouldn't build either.我尝试恢复到之前的提交,但它也不会构建。 I read the troubleshooting page, to no avail.我阅读了故障排除页面,但无济于事。 I don't have any idea of what to do anymore, please help.我不知道该怎么办了,请帮忙。

the error:错误:

The page build failed with the following error:页面构建失败,出现以下错误:

Page build failed.页面构建失败。 For more information, see help[dot]github.com/articles/troubleshooting-github-pages-build-failures.有关更多信息,请参阅 help[dot]github.com/articles/troubleshooting-github-pages-build-failures。

For information on troubleshooting Jekyll see:有关 Jekyll 故障排除的信息,请参阅:

help[dot]github.com/articles/troubleshooting-jekyll-builds help[dot]github.com/articles/troubleshooting-jekyll-builds

If you have any questions you can contact us by replying to this email.如果您有任何问题,可以通过回复此电子邮件与我们联系。

I'm using the web interface of github (not ideal, I know).我正在使用 github 的网络界面(不理想,我知道)。 the repository is here.存储库在这里。

The problem was caused by a GitHub server outage, not a problem in my code.该问题是由 GitHub 服务器中断引起的,而不是我的代码中的问题。

Anyone can check over at the github status website if their server is down.如果他们的服务器出现故障,任何人都可以在github status 网站上查看。 If it is, there isn't much you can do except wait until it is back up again...如果是这样,除了等到它再次恢复外,您无能为力...

The same error occured for me.我也发生了同样的错误。 But it wasn't caused by the Github server issue neither by me.但这不是由我的 Github 服务器问题引起的。 If you are not using jekyll to build,then the issue was sometimes GitHub pages will mistake certain characters, specifically curly braces, as jekyll objects, tags, etc. causing your page build to fail.The solution is to create an empty file .nojekyll in your root folder.如果你没有使用 jekyll 构建,那么问题是有时 GitHub 页面会错误地将某些字符,特别是花括号,作为 jekyll 对象、标签等,导致你的页面构建失败。解决方法是创建一个空文件.nojekyll在您的根文件夹中。

And build it again.并重新构建它。 It solved mine.它解决了我的。 Hope it helps someone.希望它可以帮助某人。

I just ran into this same issue and I'd never even heard of jekyll and wasn't trying to use it.我刚刚遇到了同样的问题,我什至从未听说过 jekyll,也没有尝试使用它。 Apparently it's included in github.io by default, and it " Transforms your plain text into static websites and blogs " ( reference ).显然它默认包含在 github.io 中,它“将纯文本转换为静态网站和博客”(参考)。

After reading a number of these answers and visiting the linked doc about front matter , I realized what went wrong.在阅读了许多这些答案并访问了有关前端问题的链接文档后,我意识到出了什么问题。 I had a text file in my project folder with a "to do" list, and the top of the file started with:我的项目文件夹中有一个带有“待办事项”列表的文本文件,文件顶部以:

---
TO DO
---

and that formatting (3 dashes & line break, text & line break, 3 dashes) just happened to correlate to the jekyll/YAML "front matter block", but TO DO wasn't valid data, so it failed.并且该格式(3 个破折号和换行符、文本和换行符、3 个破折号)恰好与 jekyll/YAML“前端问题块”相关,但TO DO不是有效数据,因此它失败了。

So there are two different solutions that work:因此,有两种不同的解决方案有效:

  1. Change the formatting in the text file to be more than 3 dashes in a row.将文本文件中的格式更改为连续 3 个以上的破折号。
  2. According to this link , you can "disable the Jekyll build process by creating an empty file called .nojekyll in the root of your publishing source".根据此链接,您可以“通过在发布源的根目录中创建一个名为 .nojekyll 的空文件来禁用 Jekyll 构建过程”。

The second option is better because you won't accidentally run into this issue again.第二种选择更好,因为您不会意外再次遇到此问题。

Also, if it isn't working, make sure the .nojekyll file is in your root folder.此外,如果它不起作用,请确保 .nojekyll 文件位于您的根文件夹中。 I had mine in username.github.io/mywebsite/ (which was the root of my website I was publishing), but that didn't work.我在 username.github.io/mywebsite/(这是我发布的网站的根目录)中有我的,但这不起作用。 It has to be in the root of your github project (in your username.github.io folder).它必须在您的 github 项目的根目录中(在您的username.github.io文件夹中)。

As you (and myself) discovered, GitHub suffered a major outage.正如您(和我自己)发现的那样,GitHub 遭遇了重大中断。

As a sidenote, all Jekyll pages require "Front Matter" if it's not included it won't build properly.作为旁注,所有 Jekyll 页面都需要“Front Matter”,如果不包含它就不会正确构建。 It looks like below:它看起来像下面:

---
layout: Template
title: Web Development Page
---

More info here: https://jekyllrb.com/docs/frontmatter/更多信息在这里: https : //jekyllrb.com/docs/frontmatter/

If your problem is similar to mine you should've gotten an email similar to this.如果您的问题与我的类似,您应该收到与此类似的电子邮件。

<----------------------------------------------------------/> The page build failed for the master branch with the following error: <------------------------------------------------- ---------/> master 分支的页面构建失败,错误如下:

unable to build page.无法建立页面。 Please try again later.请稍后再试。

For information on troubleshooting Jekyll see:有关 Jekyll 故障排除的信息,请参阅:

https://help.github.com/articles/troubleshooting-jekyll-builds https://help.github.com/articles/troubleshooting-jekyll-builds

If you have any questions you can contact us by replying to this email.如果您有任何问题,可以通过回复此电子邮件与我们联系。 < ---------------------------------------------------------/> < ------------------------------------------------- --------/>

While you can and should use the link provided by @cameronHurd - twitter.com/githubstatus/status/789452827269664769 and by @brunocuconato - https://status.github.com/ to see if there was an error during your build, you can also email support@github.com and they will be able to manually rebuild your site.虽然您可以并且应该使用@cameronHurd - twitter.com/githubstatus/status/789452827269664769 和@brunocuconato - https://status.github.com/提供的链接来查看构建过程中是否出现错误,但您可以还发送电子邮件至 support@github.com,他们将能够手动重建您的站点。 Simply reply to the email you were sent and maybe include a link to your repo.只需回复您收到的电子邮件,并可能包含指向您的回购的链接。 I tried waiting until things were fixed and found this to be a much better solution.我尝试等到事情解决后发现这是一个更好的解决方案。 You can also reach out to GitHub on twitter but I'm not sure about the response speed on there.您也可以在 twitter 上联系 GitHub,但我不确定那里的响应速度。

Please make sure that there is no issues with your data in your .md file.请确保您的 .md 文件中的数据没有问题。 I had this problem and at the end there was an extra comma (,) in my tag list, because of that my build was keep on failing.我遇到了这个问题,最后在我的标签列表中有一个额外的逗号 (,),因为我的构建一直失败。 You can see the complete answer here .你可以在这里看到完整的答案。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM