Jekyll Date/Time in the Now


Phoenix Wright and Miles Edgeworth both saying Objection!

As a testament to how little I update my blog of late and how little I update any of my ruby gems or indeed any of my system at all, I tried to regenerate my blog tonight and it choked on itself.

[Takano:~/Documents/jekyll] kiri% jekyll serve --baseurl '' --limit_posts 10
Configuration file: /Users/kiri/Documents/jekyll/_config.yml
            Source: .
       Destination: ./_site
      Generating... 
      Invalid Date: '2015-01-01' is not a valid datetime.
  Liquid Exception: exit in ./_layouts/default.html

Unbeknownst to me, working on the SMASH! website as its de facto coordinator seems to have updated my ruby gems through the bundler we use. While it seems inconceivable that I did not notice this issue when the only solution I could find after a casual search on the internet was from January 2014, the evidence would prove otherwise.

The solution itself was pretty simple though - after a lot of initial confusion, I realised that the only explanation from the suggestions of all these users that could be causing the problem was simply the fact I was using page.date in my default.html layout.

While this seems to be recommended by various people on the web, one must be aware of its dated nature I suppose. Jekyll’s site itself now states site.time. Changing this seems to have solved the problem, pending further confirmation of the site metadata.

[Takano:~/Documents/jekyll] kiri% jekyll serve --baseurl '' --limit_posts 10
Configuration file: /Users/kiri/Documents/jekyll/_config.yml
            Source: .
       Destination: ./_site
      Generating... 
                    done.
 Auto-regeneration: enabled for '.'
Configuration file: /Users/kiri/Documents/jekyll/_config.yml
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.