title: Invalid date while building on Github Pages
body: <p>I pushed an update to my Github Pages site and it fails the build. Locally it builds just fine though.</p>
  
  <p>Repo: <a href="https://github.com/valeIT/valeIT.github.io/" rel="nofollow noreferrer">https://github.com/valeIT/valeIT.github.io/</a></p>
  
  <blockquote>
    <p>The page build failed with the following error:</p>
    
    <p>The value 'nil' was passed to a date-related filter that expects valid
    dates in <code>/_layouts/post.html</code> or one of its layouts. For more
    information, see
    <a href="https://help.github.com/articles/page-build-failed-date-is-not-a-valid-datetime/" rel="nofollow noreferrer">https://help.github.com/articles/page-build-failed-date-is-not-a-valid-datetime/</a>.</p>
    
    <p>For information on troubleshooting Jekyll see:</p>
    
    <p><a href="https://help.github.com/articles/troubleshooting-jekyll-builds" rel="nofollow noreferrer">https://help.github.com/articles/troubleshooting-jekyll-builds</a></p>
  </blockquote>
  
  <p>I took a look at "/_layouts/post.html", but my knowledge of Liquid is pretty basic and couldn't see anything wrong in it.</p>
  
  <p>Content of post.html:</p>
  
  <pre><code>---
  ---
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    {% include head.html %}
    &lt;body itemscope itemtype="http://schema.org/Article"&gt;
      {% include header.html %}
      &lt;main class="content" role="main"&gt;
        &lt;article class="post"&gt;
          {% if page.image %}
          &lt;div class="article-image"&gt;
            &lt;div class="post-image-image" style="background-image: url({% if page.image %}{{ page.image }}{% endif %})"&gt;
              Article Image
            &lt;/div&gt;
            &lt;div class="post-image-image2" style="background-image: url({% if page.image2 %}{{ page.image2 }}{% endif %})"&gt;
              Article Image
            &lt;/div&gt;
            &lt;div class="post-meta"&gt;
              &lt;h1 class="post-title"&gt;{{ page.title }}&lt;/h1&gt;
              &lt;div class="cf post-meta-text"&gt;
                &lt;div class="author-image" style="background-image: url({{ site.author_image }})"&gt;Blog Logo&lt;/div&gt;
                &lt;h4 class="author-name" itemprop="author" itemscope itemtype="http://schema.org/Person"&gt;{{ site.author }}&lt;/h4&gt;
                on
                &lt;time datetime="{{ page.date | date: "%F %R" }}"&gt;{{ page.date | date_to_string }}&lt;/time&gt;
                &lt;!-- , tagged on {{#foreach tags}}&lt;span class="post-tag-{{slug}}"&gt;{{#if @first}}{{else}}, {{/if}}&lt;a href="/tag/{{slug}}"&gt;{{name}}&lt;/a&gt;&lt;/span&gt;{{/foreach}} --&gt;
                 - {{ page.content | number_of_words }} Words - {{ content | reading_time_as_i }}.
              &lt;/div&gt;
              &lt;div style="text-align:center"&gt;
                &lt;a href="#topofpage" class="topofpage"&gt;&lt;i class="fa fa-angle-down"&gt;&lt;/i&gt;&lt;/a&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          {% else %}
          &lt;div class="noarticleimage"&gt;
            &lt;div class="post-meta"&gt;
              &lt;h1 class="post-title"&gt;{{ page.title }}&lt;/h1&gt;
              &lt;div class="cf post-meta-text"&gt;
                &lt;div class="author-image" style="background-image: url({{ site.author_image }})"&gt;Blog Logo&lt;/div&gt;
                &lt;h4 class="author-name" itemprop="author" itemscope itemtype="http://schema.org/Person"&gt;{{ page.author }}&lt;/h4&gt;
                on
                &lt;time datetime="{{ page.date | date_to_xmlschema }}"&gt;{{ page.date | date_to_string }}&lt;/time&gt;
                &lt;!-- , tagged on {{#foreach tags}}&lt;span class="post-tag-{{slug}}"&gt;{{#if @first}}{{else}}, {{/if}}&lt;a href="/tag/{{slug}}"&gt;{{name}}&lt;/a&gt;&lt;/span&gt;{{/foreach}} --&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;br&gt;
          &lt;br&gt;
          &lt;br&gt;
          {% endif %}
          &lt;section class="post-content"&gt;
            &lt;div class="post-reading"&gt;
              &lt;span class="post-reading-time"&gt;&lt;/span&gt; read
            &lt;/div&gt;
            &lt;a name="topofpage"&gt;&lt;/a&gt;
            {{content}}
          &lt;/section&gt;
          &lt;footer class="post-footer"&gt;
            &lt;section class="share"&gt;
              {% for social in site.social %}
                {% if social.share_url != null %}
                  &lt;a class="icon-{{ social.icon }}" href="{{ social.share_url }}{{ social.share_title }}{{page.title | cgi_escape}}{{ social.share_link }}{{site.url}}{{page.id}}"
                    onclick="window.open(this.href, '{{ social.icon }}-share', 'width=550,height=255');return false;"&gt;
                  &lt;i class="fa fa-{{ social.icon }}"&gt;&lt;/i&gt;&lt;span class="hidden"&gt;{{ social.icon }}&lt;/span&gt;
                  &lt;/a&gt;
                {% endif %}
              {% endfor %}
            &lt;/section&gt;
          &lt;/footer&gt;
          &lt;div class="bottom-teaser cf"&gt;
            &lt;div class="isLeft"&gt;
              &lt;h5 class="index-headline featured"&gt;&lt;span&gt;Written by&lt;/span&gt;&lt;/h5&gt;
              &lt;section class="author"&gt;
                &lt;div class="author-image" style="background-image: url({{site.author_image}})"&gt;Blog Logo&lt;/div&gt;
                &lt;h4&gt;{{ site.author }}&lt;/h4&gt;
                &lt;p class="bio"&gt;{{author.bio}}&lt;/p&gt;
                &lt;hr&gt;
                &lt;p class="published"&gt;Published &lt;time datetime="{{ page.date | date: "%F %R" }}"&gt;{{ page.date | date_to_string }}&lt;/time&gt;&lt;/p&gt;
              &lt;/section&gt;
            &lt;/div&gt;
            {{/post}}
            &lt;div class="isRight"&gt;
              &lt;h5 class="index-headline featured"&gt;&lt;span&gt;Supported by&lt;/span&gt;&lt;/h5&gt;
              &lt;footer class="site-footer"&gt;
                 &lt;section class="poweredby"&gt;&lt;a href ="{{site.url}}/apps"&gt;Check Out My Apps&lt;/a&gt;&lt;/section&gt;
                &lt;a class="subscribe" href="{{ "/feed.xml" | prepend: site.baseurl }}"&gt; &lt;span class="tooltip"&gt; &lt;i class="fa fa-rss"&gt;&lt;/i&gt; You should subscribe to my feed.&lt;/span&gt;&lt;/a&gt;
                &lt;div class="inner"&gt;
                  &lt;section class="copyright"&gt;All content copyright &lt;a href="{{@blog.url}}/"&gt;{{site.author}}&lt;/a&gt; &amp;copy; {{ site.time | date: '%Y' }}&lt;br&gt;All rights reserved.&lt;/section&gt;
                &lt;/div&gt;
              &lt;/footer&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          {%if site.disqus %}
          &lt;div id="disqus_thread"&gt;&lt;/div&gt;
          &lt;script type="text/javascript"&gt;
              /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
              var disqus_shortname = '{{site.disqus}}'; // required: replace example with your forum shortname
              /* * * DON'T EDIT BELOW THIS LINE * * */
              (function() {
                  var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
                  dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
                  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
              })();
          &lt;/script&gt;
          &lt;noscript&gt;Please enable JavaScript to view the &lt;a href="http://disqus.com/?ref_noscript"&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;
          {% endif %}
        &lt;/article&gt;
      &lt;/main&gt;
      &lt;div class="bottom-closer"&gt;
        &lt;div class="background-closer-image" {%if site.cover %} style="background-image: url({{ site.cover }})"{% endif %}&gt;
          Image
        &lt;/div&gt;
        &lt;div class="inner"&gt;
          &lt;h1 class="blog-title"&gt;{{ site.title }}&lt;/h1&gt;
          &lt;h2 class="blog-description"&gt;{{ site.description }}&lt;/h2&gt;
          &lt;a href="/" class="btn"&gt;Back to Overview&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      {% include javascripts.html %}
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any idea?</p>