shaoyihe
shaoyihe

Reputation: 1087

Why is Jekyll not working in local when I add a new post?

I am testing my github site with Jekyll, but when I add a new post it is not generating the post in the _posts folder, so it can't get site.posts in index.html. I had jekyll serve running in local.

My folder:

error folder

The local page:

get 0 post

The local:

local jekyll

However, it works fine on the github site. So what's the problem?

Upvotes: 2

Views: 1630

Answers (2)

broguinn
broguinn

Reputation: 591

I had the same problem: I could see my code on github pages, but not locally. The problem seemed to be with incompatibility between jekyll-paginate and the current Rubygems version of Jekyll: 3.4.0.

I uninstalled that version of jekyll with gem uninstall jekyll and then installed the version used by Github Pages: 3.3.1.

Works like a charm now!

Upvotes: 1

David Jacquel
David Jacquel

Reputation: 52829

This a Jekyll 3.x behavior. Posts with a date in the future are not published, except if you :

  • set a future: true variable in _config.yml

or

  • do a jekyll serve --future

This is not a problem under Jekyll 2.x and Github pages.

Upvotes: 14

Related Questions