Home > Blockchain >  GitHub Pages site will not load any theme other than minima
GitHub Pages site will not load any theme other than minima

Time:12-24

Versions

Windows 10.0.19044.2364
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x64-mingw-ucrt]
gem v3.3.26
jekyll 4.3.1

Problem

With my Gemfile and _config.yml in a default configuration using the minima theme, everything works as expected. When I attempt to change to another theme (any theme), the site fails to load propertly.

Details

My default Gemfile:

source "https://rubygems.org"
# gem "jekyll", "~> 4.3.1"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima"

gem "github-pages", "~> 227", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
  gem "jekyll-remote-theme"
end
...

My default _config.yml:

title: default theme...
email: [email protected]
description: ...description...
domain: "chrisxfire.github.io"
url: "http://chrisxfire.github.io"

# Build settings
theme: minima

# remote-theme: pages-themes/[email protected]
plugins:
- jekyll-feed
- jekyll-remote-theme

GitHub Pages generates the site correctly and the page is normal:

enter image description here

Next, I attempt to use a enter image description here

What am I doing wrong?

CodePudding user response:

testing midnight theme... is your theme title.

To show the page in midnight black, I have moved your github-pages gem into plugins in the Gemfile:

source "https://rubygems.org"

group :jekyll_plugins do
  gem "github-pages"
  gem "jekyll-feed", "~> 0.12"
  gem "jekyll-remote-theme"
end

That was all, at least locally.

The current post and home layouts in pages and posts will create warnings, and reset them to default.

The theme is not required in your Gemfile anymore, as you use the remote -theme options in your _config.yml.

  • Related