Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get a blank page after pushing a site using Github pages with Jekyll

I created a GitHub Pages site with Jekyll. Everything is fine when browsing to http://localhost:4000.

Then I pushed it to GitHub, but there is nothing (blank page, no error, no content) when accessing https://USERNAME.github.io/.

The content of Gemfile,

source "https://rubygems.org"
ruby RUBY_VERSION

gem "minima", "~> 2.0"

gem "github-pages", group: :jekyll_plugins

group :jekyll_plugins do
   gem "jekyll-feed", "~> 0.6"
end

The structure of my repo, (why is _site not uploaded?)

_posts        Initial commit for Jekyll             23 hours ago
.gitignore    Initial commit for Jekyll             23 hours ago
Gemfile       Uncomment some lines for GitHub Pages 23 hours ago
Gemfile.lock  Initial commit for Jekyll             23 hours ago
_config.yml   Initial commit for Jekyll             23 hours ago
about.md      Initial commit for Jekyll             23 hours ago
index.md      Initial commit for Jekyll             23 hours ago

Do I miss some steps?

like image 426
SparkAndShine Avatar asked Oct 08 '16 14:10

SparkAndShine


2 Answers

I had similar problem when I've tried to use theme which is not supported by GitHub Pages.

Then I've found out that GitHub Pages support custom themes: https://blog.github.com/2017-11-29-use-any-theme-with-github-pages/

For example in my case I wanted to use this theme which is in a gem: https://github.com/mmistakes/minimal-mistakes

And instead of changing theme in _config I had to add remote_theme: remote_theme: mmistakes/minimal-mistakes

like image 194
Artur Małecki Avatar answered Oct 13 '22 07:10

Artur Małecki


_site was not uploaded because it is in your .gitignore file.

"GitHub Pages manages your site's build process with a single push to your site's publishing branch" so you do not need to upload the files of a built site.

Verify your site is being built from the source folder you intend. See these instructions.

like image 22
TT-- Avatar answered Oct 13 '22 06:10

TT--