Github Pages: Page build failed - github

I'm constantly getting the following error messages from github when I try to push my Jekyll site to their pages.
The page build failed with the following error:
Page build failed. For more information, see
https://help.github.com/articles/troubleshooting-github-pages-build-failures.
If you have any questions please contact us at
https://github.com/contact.
I ran jekyll serve to see if anything suspicious is going on, but the only thing it gives me is a warning: Build Warning: Layout 'default' requested in app/index.html does not exist.
Am I missing something? All my files are on Github: https://github.com/BobWassermann/confguide

Github pages is looking for your files at the root of your repository, then as it doesn't find _layouts and so on, at the right place, the build fails.
To avoid this, in config.yml add source: app.
Note: As your repository will be served at https://github.com/BobWassermann/confguide, all links to your assets will fail.
To avoid this, in config.yml add baseurl: /confguide.
And in default.html call your assets with {{site.baseurl}} like this :
<link rel="stylesheet" href="{{site.baseurl}}css/syntax.css">
and same for other assets (css/js/img).

Tried everything above, but nothing helped.
Went trough everything and found the bug. Github does not support a "_" folder in your images directory, even if it's in your copy task in Gruntfile.
Removing my "_posts" folder in the img folder solved this issue.

Related

Some files missing in Vercel source/output files after build

I have a blog project in production. If I check the deployment source under output tab, some files are missing in pages folder. It shows "no output files."
This is not affecting surfing the blog, everything works fine. The build log is perfect as well, no errors or warnings. What I realized is that all the missing pages in the Vercel output folder can't be crawled by search engines, so they suffer SEO.
Vercel is picking the files from my git commit so it's automatic once I commit to main. The deployment settings wasn't tampered with so it's the default for a NextJS project as set by Vercel, and the build log shows that all these missing files were successfully generated.
I've searched everywhere online, I saw someone with similar problem on one blog like that but no solution to it yet. I contacted Vercel, they said maybe it's NextJS specific issue which I strongly doubt, still no solution provided.
I wonder why pages will be successfully generated yet they won't appear in the Vercel output folder.
After days of no solution, I opened another complaint with Vercel and another agent was assigned to me. I was told that the 'missing files' in Source folder is not missing exactly, but there was a bug in their File Tree component. I can confirm now that the files are now visible in in Vercel source folder, perhaps, this bug has been attended to.
EDIT
After another commit, the No source files error still showed but got fixed after re-deploying the commit from Vercel.

Page Build Error from static /docs folder on Github Pages

I have a static site, built locally by Jekyll, in a /docs folder inside the master branch of my repo, and have set my GH Pages settings to serve from that folder.
However, I keep getting Your site is having problems building: Page build failed. For more information, see https://help.github.com/articles/troubleshooting-github-pages-build-failures.
Some notes:
The repo itself is a Jekyll project, however, as I am using a private submodule GH Pages won't serve this as a Jekyll site, therefore this is why I have compiled the site locally to /docs and set this to be where GH Pages serves from.
The files in /docs are all compiled and just HTML, CSS and JS. No folders or files with _ preceding.
I have added .nojekyll in both the /docs folder and also in the root of the project, just in case.
The error message above is the only information GitHub is returning; no specific error code.
As far as I can tell, this is just a basic static website and GH should have no problem serving it. The only thing I can think is that it's getting confused by the fact that it's inside a jekyll project, but the only fix I can see for that is .nojekyll and that hasn't worked.
Does anyone have any ideas? I'm afraid I can't share the repo as it is a private company repo.
Posting this answer immediately so others may find it useful.
The private submodule breaks the build process, even though the pages site is set to serve from the /docs subfolder. Removing the submodule fixes the issue and serves the site as expected.

why jekyll tag not working on github give 404 erro but it works on localhost

I use this tutorial for create tags on jekyll its work correctly on localhost when I click on a tag link it take me to the /tags/tag_name page but when I push it to the github this directory (/tags/tag_name page) give me 404 error! how can i fix this problem?
If you site lives at http://example.com/mysite, you need to set baseurl: /mysite in _config.yml, and call you pages like this :
Tag
It seems that github disables custom plugins for security reasons, thus, the .rb file that this tutorial uses will not work. There does seem to be a workaround, however, which involves compiling your Jekyll source code to the _site directory before pushing to github server. See this post

post_url causing build failure with github

I am trying to link to another post in my blog. The markdown for both the blog resides in the same folder under _posts. However, when I try to use post_url I always get a build failure with github.
This is how i am declaring it in my markdown.
[Part2 - Details about PyVM and the execution of VM]({% post_url 2016-01-06-PyVyM-Part2 %})
I am adding the code for the post_url in the PyVym-Introduction file.
My .config.yml looks like this.
# Build settings
markdown: redcarpet
pygments: true
permalink: pretty
highlighter: pygments
If I remove the post_url code then there are no build failures. Can someone point me to the mistake here ?
[edited]: github failure email has no error message. It just says build failed.. Exact message below..
"""
The page build failed with the following error:
Page build failed. For more information, see https://help.github.com/articles/troubleshooting-github-pages-build-failures.
"""
Are you using another repository named "pretty" with a gh-pages branch?
Github warns of duplicating these URL's here
If you are having issues with your Jekyll Pages, make sure you are not using categories that are named the same as another project, as this could cause path conflicts. For example: if you have a blog post named 'resume' in your User Page repository and a project named 'resume' with a gh-pages branch, they will conflict with each other.

Using Github pages with Jekyll in a subdirectory

I recently wanted to publish my Jekyll site on Github pages, but it seems that putting everything in a subdirectory is giving some issues, even after I change the source to the correct directory.
My structure looks like this:
- site
- src (contains all Jekyll stuff)
- README.md
- GruntFile.js
- ...
Locally my site builds perfectly and when I go to http://localhost:4040 I can see it just nicely, but when I commit this to my Github and visit username.github.io I get a 404, if I go to username.github.io/src I can see part of my site, however all {% include %} are ignored.
In my _config.yml I updated the source: source: ./src, but that doesn't seem to help.
Is there a way to make Github Pages handle subdirectories properly? Basically I want to tell it that my Jekyll site is inside /src, and I want the url to just be username.github.io instead of username.github.io/src
I know i can use the pages branch and commit to there, but I would prefer if it could happen automaticly.
If it helps anyone, I attempted to run Jekyll on GH Pages from a subdir (and modified source) and was banging my head against the wall over these errors:
A file was included in subdir/index.html that is a symlink or does not exist in your _includes directory. For more information, see https://help.github.com/articles/page-build-failed-file-is-a-symlink.
After much searching on this, the definitive answer was right there in the docs:
Configuration Overrides
We override the following _config.yml values, which you are unable to
configure:
safe: true
lsi: false
source: your top-level directory
Keep in mind that if you change the source setting, your pages may not
build correctly. GitHub Pages only considers source files in the
top-level directory of a repository.
I contact Github support and they gave me 2 solutions.
Move all my Jekyll source files to my top-lever directory.
Use a different branch and update it manually each time.