If your GitHub Pages repository contains a page which displays an invalid datetime, your GitHub Pages site will not build.

If your GitHub Pages site fails to build because of an invalid datetime, you'll get an email that looks like this:

Subject: Page build failed

The page build failed with the following error:

The value '' was passed to a date-related filter that expects valid dates in `example.md` or one of its layouts

Troubleshooting invalid datetimes

Tip: We strongly recommend running Jekyll locally so you can easily debug and fix build errors before pushing to GitHub. To learn more about troubleshooting options, see "Troubleshooting GitHub Pages builds."

  • Reproduce the error by building your Jekyll site locally with the github-pages gem.
  • From the error described in the email, review the file and its layouts for calls to any date-related Liquid filters.
  • Ensure variables being passed into date-related Liquid filters have values in all cases (passing nil or "" will trigger this error).

Once you've fixed any invalid datetimes, trigger another build on the server by committing and pushing your changes to your GitHub Pages repository.