简体   繁体   中英

jekyll and github - how to update the blog post?

Good day.

Could you help me with a little problem I am experiencing.

I have a jekyll blog on the github. The problem is after I updated my old post, committed and pushed it, the blog post doesn't show any changes, but I see that the commit has been pushed successfully.

If I run jekyll --server locally, it shows updated blog post and it doesn't report any errors. I have no jekyll plugins installed.

What am I doing wrong or misunderstanding? Thanks a lot.


Added by Nawaz :

I'm facing exactly same problem. My I pushed added one markdown post and few css, and modified layouts and includes, then I pushed them to github. It is done successfully. My github is showing all the changes in the repository, but the github blog (ie the generated html posts out of markdown) are still same. No change to them at all. It is showing some posts which doesn't even exist in the repository. But when I do jekyll --server locally, then every update is being shown on my (local) blog hosted at http://localhost:4000 .

Please help me!

If your Jekyll site is not rendering properly after you push it to GitHub, it's useful to run Jekyll locally so you can see any parsing errors. In order to do this, you'll want to use the same version that we use.
GitHub's Pages servers currently use Jekyll 0.11.0 with Liquid 2.2.2 , and run it using this command:
$ jekyll --pygments --safe

More info

I'm now trying to solve the problems with my pygments highlighting (works locally, doesn't show on github at all, even though I'm receiving mails about succesful build). Findings so far:

  • Make sure that youre repository' default branch is 'master' (go to your repository Admin page).
  • Put your Jekyll source files in some other branch, and put the _site content to your master branch. There will be no _config.yml , no YAML front matter so github will render your stuff as is, and you would be building it locally on that other branch. This actually worked for me. It requires some manual labour when moving _site from that other branch to your master, but I'm fine with that - at least I do not have to rely on github build process which seems to be a bit buggy, plus, I can have whatever plugins I wish.

When ever you generate your jekyll site locally for testing, always run jekyll --no-auto --server . This would display if there were any errors encountered during the generation of your site. Also, before generating your site delete _site directory and then run the command as described above.

Let me know if you see any errors as such. We can debug further

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM