GitHub pages and jekyll deploy not working properly - github

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.

Related

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>

Github pages issue with username

I have followed this guide to setup my GitHub Pages. My username is FReina, and therefore I thought that my website would be at FReina.github.io. However, I consistently get a 404.
Anybody know if this is due to the uppercase in my username?
The issue is simply caused by the fact that there is latency between your username.github.io repository on Github and the actual hosted website. Usually this is only a few minutes, but I have known it to be much longer than that when the site is busy.
From my PC, it looks like your site is now up, and displaying a Hello World page. If you still cannot see it, it may be that the 404 page is cached by your browser - try emptying your browser cache (on Chromium-based browsers including Google Chrome and newer versions of MS Edge, this is done by opening the Inspect Element tool, clicking-and-holding the reload button and selecting "Empty cache and hard-refresh")

There isn't a GitHub Pages site here

I tried to setup two repository github pages. Just wondering why one works and the other doesn't.
Works - https://ngaisteve1.github.io/calculator/
Doesn't Work - https://ngaisteve1.github.io/BlackJackJS/
Second question is, is it possible for my to deploy my html with Javascript in GitHub pages or is it GitHub pages is only deploy html page?
Both links work now. GitHub Pages might take a moment to deploy your most recent changes.
You can host any static content, including client-side JavaScript (GitHub Pages will not run any code for you on its back end).

jekyll post displaying on local server, but not live

i've been running my personal site on jekyll for years now, and i've never had this tricky of a problem.
all the projects on my site are displayed as thumbnails on the homepage, packed in there using Isotope. the viewer can then click the thumbnails to get a full explanation of the project. for my collection of photographs, i have the thumbnail image link to another index page, which lists out all the posts made in the "photo" category. that photo index still exists when the URL is manually entered, but the photo thumbnail on the homepage that leads to it has disappeared on my live site. running jekyll locally, it shows up & works fine.
this is a recent occurrence, i've been running my photo page this way for years with no problems. is it a problem with the YML frontmatter? or the file syntax (the "photo" link is at the bottom)? my site is hosted on github, which also might be the problem.
thanks in advance for your help. quite stuck here.
A notable change in Github Pages : Jekyll version is now 3.0.x.
Locally, I guess, you're using Jekyll 2.x.
Main difference in our case, is that Jekyll 3.0 doesn't publish posts with a date in the future. As your 2017-01-01-photo.md post is considered to be dated in 2017, it's not published.
In order to tel jekyll to publishe posts with future dates, you can set future: true in your _config.yml.
If you want to work locally with same dependencies than github pages, you can follow instructions here.

How long does it take for GitHub page to show changes after changing index.html

I am just wondering how long does it take for GitHub page to show the new items that I have added to the repository.
I changed index.html but after 10 minutes it still showed up the previous page...
The first time you generate your site it will take about 10 minutes for it to show up. Subsequent builds take only seconds from the time you push the changes to your GitHub repository.
However, depending on how your have your domain configured, there may be extra time for the CDN cache to break.
Note: using a subdomain, such as yourproject.github.io is the recommended domain setup, but does mean page builds take longer to show up since it has the benefit of using the GitHub CDN.
Github pages are cached with CDN. As explained by JoelGlovier in comments, you can still have the latest version of your pages by appending a version in the query string such as https://username.github.io/awesome-repo/?version=f36af92 so that you won't get a cached version of your page.
Github also has a deployment page: https://github.com/<user>/<repo>/deployments that lists the deployments and the time they were deployed.
Choose github-pages from the environments drop-down list.
This helps to know if your latest git push was deployed at all.
Github pages are cached with CDN.So the user has to clear the site cache everytime to load new changes.To overcome this you can use meta tags in the HTML code, they will load the webpage without caching.Include this in your index.html file.
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
Using this you won't get a cached version of your page.