GitHub Pages (jekyll blog) showed 404 - github

I tried to build up a Jekyll blog website using GitHub pages. I could check the homepage, but the subpages (about & blogposts) showed 404.
To find out where the problem is, I opened a new repo. And I set up the basic things of a Jekyll site using jekyll new . locally and uploaded them to the Github repo. I did not change anything after this step.
And then, I used jekyll serve to run the local test, and everything went well. The layout looked nice and I could check the first blog "Welcome to Jekyll!"(built by default).
However, when I used the link of GitHub Pages to check, the layout of the homepage looked quite different, and I could not check the default blogpost "Welcome to Jekyll!", which showed me 404.
How can I fix it?
This is my repo: https://github.com/jl-xie-kcl/blog20211122
(you can check the screenshots in issue 2 https://github.com/jl-xie-kcl/blog20211122/issues/2)

Those pages do work, your links are just incorrect because your blog is not at the root of your domain — and this goes the same for the style and images not working, by the way:
The link to your about page: https://jl-xie-kcl.github.io/blog20211122/about
The link to your blog post: https://jl-xie-kcl.github.io/blog20211122/jekyll/update/2021/11/22/welcome-to-jekyll.html
In order to fix this, you will have to change the baseurl value in your _config.yml to:
baseurl: "/blog20211122"
As stated by the comment on this configuration line:
baseurl: "" # the subpath of your site, e.g. /blog

Related

Github Blog page on jekyll always returns 404?

I used jekyll theme. I complied my page on my local. Then i created a repo. I pushed to "_site" to the repo. But I got error about page. I can't reach the blog. It returns 404. You can check at the below.
https://github.com/capitansec/cyberclub.github.io
http://cyberclub.github.io/
What shoul I do?
If you look at the Github pages documentation, you will see that from profile capitansec, you can only create a user/company website at URL capitansec.github.io and not at cyberclub.github.io. To do this, you would have to create a new profile called cyberclub. The other two options that you have for the scenario above is to:
Use capitansec.github.io as your URL and rename the repository above appropriately
Register a different domain with your registrar and use this as a custom domain as described here

deployed page loads but does not show - built with gatsby

I deployed a gatsby blog I made to github pages. The first page links to a blog article. Nothing shows up when the link is clicked. But if I type the url in manually (Same url that is linked) I see the page for half a second before it dissapears to a blank page.
Helpful information
Everything in the network tab is status code 200
The HTML is returned in the get request, it is visible in the response
head tag is on the page correctly, body tag is missing the html
No console errors
Works perfectly on development server (localhost)
Domain is hosted with domain.com
Using createpage gatsby plugin to generate article page
It works when I deploy on netlify to a random url so maybe something to do with my domain or the gh-pages deployment
After looking at your GitHub code, I think you have a problem here: (Wrong URL: /blog/blog/why-gatsby), also your master code does not match code with the gh-pages (I know it's generated files from gatsby build but other stuff). Also, why are you creating a static query in the index.js component? You can do that with a regular page query.
Your gatsby site starts from https://www.ragith.com/blog/ and that's why you have that kind of a problem. When gatsby look into pages, there's only blog.js inside of it.
I.E:
pages/blog.js
Link problem
<a class="article-card-link" href="/blog/blog/why-gatsby"><section><article><h2 class="article-title">Why Gatsby js ?</h2><p class="article-date">May 09, 2020</p><p class="article-excerpt">In a world with so many JavaScript frameworks such as React, Vue, heck even Next, why Gatsby? The short answer is, none of those frameworks are the target market of Gatsby. Gatsby is a static website generator. Great! Wait, who cares? Well a lot of my clients and so will yours…</p>READ MORE</article></section></a>

Relative Links in Github pages not working still?

I have a Github repo where the readme.md has relative links to display images from a folder called img.
![Add Remove Programs](/img/ArcGIS_Pro_DI_LicenseCheck.jpg?raw=true "Add Remove Programs")
This displays fine at the project address.
But on the Github page, the links are broken. They are trying to reference the following URL, without the project name:
https://simongis.github.io/img/ArcGIS_Pro_DI_LicenseCheck.jpg = 404
From this answer and this blog post, I thought this issue has been resolved?
Can someone point out where I am going wrong?
I have tried playing around setting the baseurl to my project director in the _config.yml but that did not seem to make any difference.
That is exactly what baseurl solves:
Base URL
Serve the website from the given base URL
Set it with the project name and make sure you generate the links in your website including it , for example with the absolute_url filter
baseurl: /gnaf-for-arcgis
![Add Remove Programs]({{'/img/ArcGIS_Pro_DI_LicenseCheck.jpg?raw=true' | absolute_url}} "Add Remove Programs")

Why isn't my github project going live?

I created a subbranch for gh-pages. I don't know why the page isn't getting created. I'm attaching the screen shot of the bash.
Even at the github page, when I hover over the tick mark, it says that github has successfully created the page.
Link to my github
To make a github pages site, you must follow the naming convention for your repository; in your case puneeth8994.github.io.
Also, the main html file should be called index.html.
The following is a great resource to get started on github pages:
https://24ways.org/2013/get-started-with-github-pages/

GitHub pages and jekyll deploy not working properly

My jekyll blog is running ok in my pc but when I open it from my gh repository it's broken. Here's a screen of that
If I click on one of the links, that next page throws 404. Needless to say, I followed the steps from the gh site in order to configure it properly.
baseurl is set, the paths to css and images are correctly set using {{ site.baseurl }}. So locally the blog works fine, but still, on gh-pages it's not.
Code is here
Another piece of information. I have a master branch and a gh-pages branch, the one updated is gh-pages, master has old code, is it ok?
Any ideas please?
It works ! What you saw was an old version of your site.
Two possible explanations :
as #goyllo says : browser cache f5 or Ctrl+r can help.
Github pages is serving the old version and the new site generation is still pending.
In order to know if you last commit has been published it to go to https://github.com/goblind/modestoRimba/settings and to watch under GitHub Pages box.
If you see Your site is ready to be published at http://goblind.github.io/modestoRimba, your site generation is pending.
If you see Your site is published at http://goblind.github.io/modestoRimba, your site have been published with last commit.
It's working fine in my browser. I want to say one thing, GitHub pages cache your old resources(including HTML, CSS, JS, Images), in browser for better UX, For example, just disconnect your internet, and reload that page again, and it will be work fine, similarly if you visit another page, then it will not load your CSS, or javascript again from your website, they will load directly from browser cache. So you are getting this error because your browser use old cache resource, and it will update again in few hour, depending on cache time.
I want to say, if your blog working fine in localhost, then don't worry, it will be also work fine in github pages as well, otherwise github will send you notice in your email regarding page build fail.
in your _config.yml baseurl: /modestorimba R should be uppercase.