Github Pages renders blank page

半腔热情 提交于 2019-12-11 01:47:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!