Page looks vastly different locally than it does on GitHub pages


I’m currently working on a project but it looks vastly different on the local site than it does on GitHub pages. I have genuinely no clue what could cause this. It is not just my device… others with whom I have shared the link see the same difference.

Here is a link to the GitHub repo: GitHub - gido-vke/PrincipalityGilaie: The official website for the government of Gilaïe
And to the GH-pages page: The Principality of Gilaïe

Something I noticed is that the CSS is slightly different for both the local and the pages view, which completely threw me off-guard because they really are the same files.

(please excuse my terrible naming, this was initially supposed to be just a hobby project)

Any help would be so greatly appreciated!

Your website is a static html website, you need to disable Jekyll on GHPages!

Create in the root folder of your repository an empty file named .nojekyll, should fix the issue.

Bear in mind that changes to a GHPage website can sometimes take a while to become effective, depending on the number of pushed you’ve been doing recently.

1 Like

I also noticed that your index.html document is trying to import some CSS stylesheets which are not present in the repository:

<link rel="stylesheet" href="assets/css/style.css">

there’s a style.css (imported in another line), in the root folder, but not one in assets/css/.

Could that be the reason? missing custom styles?

You should check if you local folder matches what’s on the repository.

Use some HTML validator, or the browser Dev Tools panel, to check that everything is in order.

1 Like

Hey man! Thanks for your reply.

I’ve looked into it a little deeper and realized that it there isn’t a missing css file, but a css file is being added for some bizarre reason.

It’s this file:
I didn’t write it and have no clue where it came from.

My problem now is that I’m not sure how I can get rid of that file.

And about the line:

<link rel="stylesheet" href="assets/css/style.css">

I’m not even remotely sure why that is there. I’ve removed it now.

Then now your local website should look identical to the one on GHPages. Is it so?

Since I can’t see the differences you mention, being able only to see the site on GH, I was wondering what type of differences you’re seeing. You mentioned them as being very significant, so I guess they are a big deal.