jekyll post displaying on local server, but not live - github

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.

Related

GitHub Pages (jekyll blog) showed 404

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

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 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.

Facebook debug not clearing cache

I recently launched a new version of a site I'm in charge of. The new version uses a different CMS and is a entirely different codebase. Now when I try to share a page from this site, I'm getting the data from the old site in the sharing preview window (facebook). I have set the correct meta og tags, and in the Facebook debug tool I tried fetching the new information but to no avail.
I also tried the following which was suggested to me:
http://www.example.com?fbrefresh=CAN_BE_ANYTHIN
I simply can't get it to fetch the new information. When checking the scraped URL, I can see the source code of the old site that hasn't been online in over a month.
What can I do?

How to make dynamic github badges, that is, images in README which change state?

How do you add a "badge" in GitHub README so that it is dynamic? By "badge", I mean
The question is even if one puts a URL in GitHub README which maps to a server returning an svg/png, how does it update automatically on GitHub README page?
As an example if you visit the link
, you'd see the updated status of the issue (which is closed), but my GitHub README page still shows outdated badge, that is, shows the issue being open.
What is an example server code (say in golang) which can render github badges dynamically?
It's just an image at a URL. It's up to the server (your example looks like Jenkins) to decide what image to provide.