DEV Community

Andreas Tiefenthaler
Andreas Tiefenthaler

Posted on • Originally published at on

TIL#2: patches in GitHub gists and reasons why jekyll won't generate my pages

Patchfiles Syntax highlighting in GitHub gists

Someone sent me gist today with a patchfile in it. To my delight, I noticed that they are highlighting the changes nicely.This improves the readability of a patch tremendously.Check out this patchfile:

It is important that the filename ends in .patch.

Jekyll and future dates

This morning I spent around 15 minutes trying to figure out why a post using jekyll would not show up.Some furious google searching resulted in a case of This makes a lot of sense, but why?

It turns out, that jekyll will not generate anything that has the date set to a future time.In my case, the date was set for today, but one hour into the future.

Here is what I learned on why it might not generate posts:

  • The post is not placed in the _posts directory.
  • The post has an incorrect title. Posts should be named YEAR-MONTH-DAY-title.MARKUP (Note the MARKUP extension, which is usually .md or .markdown)
  • The post's date is in the future. You can make the post visible by setting future: true in _config.yml (documentation)
  • The post has published: false in its front matter. Set it to true.

Big thank you to StackOverflow and their users for helping me out one more time:

Discussion (1)

citizen428 profile image
Michael Kohl

You can also get nice code-fencing for patches by using diff as the language, e.g.