Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub Pages build failure due to “nil was passed to a date-related filter that expects valid dates in 'index.html' or one of its layouts

On my Jekyll page I get this error once I commit to GitHub:

The page build failed with the following error:
The value 'nil' was passed to a date-related filter that expects valid dates in index.html or one of its layouts.

Any idea how to fix it? I went through all posts and checked the Front Matter but can't find anything wrong...

my repo is on https://github.com/el3ctron/el3ctron.github.io/ displaying http://el3ctron.github.io page.

like image 905
el3ctron Avatar asked Dec 07 '25 08:12

el3ctron


1 Answers

If all your dates are valid, I'd say it's this file: https://github.com/el3ctron/el3ctron.github.io/blob/master/_posts/%232016-10-19-Caldas.markdown%23

It doesn't fit the required format for filenames within the _posts folder as it starts with a #. This will make the date nil as the format is invalid, then eventually throw that error when it's used in {{ post.date | date: "%Y" }}.

Either rename it or remove it.

You might also be having issues with this symlink file: https://github.com/el3ctron/el3ctron.github.io/blob/master/_posts/.%232016-10-19-Caldas.markdown, which I'd also try to remove.

like image 90
Ross Avatar answered Dec 08 '25 23:12

Ross