I have a blog in a minima theme (https://christhorpe.rocks/) and after I pushed a new post to GitHub today, my page went blank and white, aside from the home link and the “posts” header.
For reference, you can visit the site (it is live)
Glad to hear your site is up and running again! I would suggest that since this solved the problem of your site not displaying, you start a new thread related to dark mode. By default, Jekyll does not have a dark mode, so it would be good for you to explain how you are accomplishing that. For example:
I was also using dark mode using the method in the documentation before, but I was using Netlify as my hosting provider then; I’m using GH pages now, though I doubt that’d make much of a difference.
I did, just now, looking through my Gemfile a commented-out line that said to uncomment If I was using GH pages. You can see more in the commit history of the repository.
This is honestly getting pretty frustrating for me, I’m thinking about rebuilding my site from the ground up.
Okay I’m not really around to take a look for a few weeks, but I’m willing to bet there is something in dark mode that uses a plug-in and if GitHub pages does not support it, you cannot use it.
There are two flavors of GitHub pages. The first is where GitHub knows you are using Jekyll and builds the site for you. That only supports certain plugins.
The other flavor is to have a repo or branch where you do the development for your site, then use an GitHub action to build your site and push the code to another branch or repo. In that case, you can use any plugins and it is essentially a similar method you would use to get your built site onto netlify.
There are lots of posts here on how to use GitHub actions to build your site so I would look there.
Unfortunately, and this goes for nearly anything, themes are designed by people that use their own code and often has a bias to how they like to program and test sites. I ultimately created a blank site with Jekyll and built mine from scratch. It’s not a ton of work if you know css and html but certainly I can see how frustrating it can be.
@ctech9 As a matter of fact, it makes a big difference.
GitHub Pages by default uses a constrained environment when building a Jekyll source. It does not take your Gemfile into consideration, unlike Netlify.
However, there is a solution for your situation. Use the supported jekyll-remote-theme plugin:
To emulate the GitHub Pages environment locally as well, use just the GitHub Pages gem in your Gemfile:
source "https://rubygems.org"
gem "github-pages", group: :jekyll_plugins
# Windows and JRuby does not include zoneinfo files, so bundle
# the tzinfo-data gem and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", "~> 1.2"
gem "tzinfo-data"
end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem "webrick", "~> 1.7"