问题
I just pushed a blank Jekyll site to my github pages. https://louissafety.github.io/ However, instead of rending the default jekyll page, it renders the blank page. What could be wrong.
It works fine on the local machine.
Github page : https://github.com/louissafety
回答1:
While your site is properly setup to use jekyll
, it's using ruby gems that are not available to github-pages
.
The only lines that you're supposed to have in your Gemfile
are:
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
Any other gems or includes may not be available to Github Pages, causing the jeykll biuld to fail
回答2:
If you try to use a custom theme for which the gem is not whitelisted by GitHub, you might need to declare the custom theme in your _config.yml
file as remote_theme: github_user/repo
, and remove it from your Gemfile
.
Here is my Gemfile
:
source "https://rubygems.org"
gem 'github-pages', group: :jekyll_plugins
And the interesting part of my _config.yml
:
remote_theme: pawamoy/jekyll-readthedocs
To build locally, just run bundle exec jekyll serve
.
More information on the GitHub help page for Jekyll themes.
来源:https://stackoverflow.com/questions/39945114/github-pages-renders-blank-page