gem "jekyll-remote-theme"
bundle exec jekyll serve
gem "jekyll-remote-theme"
.I'm trying to build a blog in GitHub Pages with Jekyll and Minimal Mistakes. Before I push changes, I'd like to check if everything's fine with the pages.
bundle exec jekyll new . --force
bundle exec jekyll serve
I had an error related to libcurl.dll
. Here is the message on Powershell.
Dependency Error: Yikes! It looks like you don't have jekyll-remote-theme or o ne of its dependencies installed. In order to use Jekyll as currently configured , you'll need to install this gem. The full error message from Ruby is: 'Could n ot open library 'libcurl': (illegal characters) . Could not open libr ary 'libcurl.dll': (illegal characters) . Could not open library 'lib curl.so.4': (illegal characters) . Could not open library 'libcurl.so .4.dll': (illegal characters) ' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
I followed instructions in GitHub Pages Dependencies Missing · Issue #17 · benbalter/jekyll-remote-theme and the problem was solved.
Then another error came up with bundle exec jekyll serve
. The page locally created is blank. http://127.0.0.1:4000/ shows nothing.
PS E:\workspace\mysite\dixhom.github.io> bundle exec jekyll serve
Configuration file: E:/workspace/mysite/dixhom.github.io/_config.yml
Source: E:/workspace/mysite/dixhom.github.io
Destination: E:/workspace/mysite/dixhom.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Remote Theme: Using theme mmistakes/minimal-mistakes
Build Warning: Layout 'single' requested in _posts/2018-02-06-welcome-to-jekyll.markdown does not exist.
Build Warning: Layout 'default' requested in 404.html does not exist.
Build Warning: Layout 'page' requested in about.md.bak does not exist.
Build Warning: Layout 'home' requested in index.html does not exist.
Build Warning: Layout 'home' requested in index.md.bak does not exist.
done in 5.423 seconds.
Auto-regeneration: enabled for 'E:/workspace/mysite/dixhom.github.io'
Server address: http://127.0.0.1:4000/
Server running... press ctrl-c to stop.
It looked like jekyll
couldn't read layout files. In addition, the _layouts
directory wasn't in the directory where I did bundle exec jekyll new
. But by default, what's in the _layouts
directory is packaged in a theme so it's normal not to see the directory. So I just copied _layouts
from minimal-mistakes GitHub repo to the local directory as a workaround.
Then, another error was raised.
PS E:\workspace\mysite\dixhom.github.io> bundle exec jekyll serve
Configuration file: E:/workspace/mysite/dixhom.github.io/_config.yml
Source: E:/workspace/mysite/dixhom.github.io
Destination: E:/workspace/mysite/dixhom.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Remote Theme: Using theme mmistakes/minimal-mistakes
Liquid Exception: Could not locate the included file 'sidebar.html' in any of ["E:/workspace/mysite/dixhom.github.io/_
includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site sourc
e. in /_layouts/single.html
jekyll 3.6.2 | Error: Could not locate the included file 'sidebar.html' in any of ["E:/workspace/mysite/dixhom.github.i
o/_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site so
urce.
I could have just copied _includes
the same way but I believe the core of the problem lies in jekyll
failing to read necessary files from, for example, a GitHub repo.
The weird thing is when I push local changes to GitHub, GitHub Pages shows a properly rendered page as shown below.
By the way, the repo is https://github.com/Dixhom/dixhom.github.io/tree/7132905f5515345eb78cd71bdad168a15f906a1c
I suspected jekyll-remote-theme
doesn't work on the local environment so I googled "jekyll remote theme serve" which wasn't helpful.
Googling keywords like "remote theme Build Warning: Layout does not exist." didn't help much.
How can I solve this problem?
You can check it locally( localhost:4000 or 127.0. 0.1:4000 ) whenever you update something and you want to check the result. Usually changing in _config. yml , you need to restart the jekyll serve (using ctrl+c to stop and run $ bundle exec jekyll serve to restart the service to check the modification.
aaaah I was just bashing my head against this as well. I ran bundle exec jekyll serve --verbose
and saw that jekyll-remote-theme
was never being initialized at all (each plugin logs a Requiring: jekyll-<thing>
line). Then I noticed this block in the Gemfile:
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end
I added "gem jekyll-remote-theme"
to that plugin block and that fixed it – doh!
There are a few notes in the jekyll changelogs about this Gemfile group, but I didn't find any of it super helpful in explaining what's going on here.
hope that helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With