Invalid date error using bundle exec jekyll serve (-vendor not working)


Hello, I’m looking for a solution to an error I’m getting with running Jakyll on my machine,

I did this (Mac 10.12.4)
$ gem install jekyll bundler
$ jekyll new jekyll-test
$ cd jekyll-test
$ bundle exec jekyll serve

And got this:

Invalid date ‘<%=’%Y-%m-%d %H:%M:%S %z’) %>’: Document ‘my-awesome-site/gems/jekyll-3.4.3/lib/site_template/_posts/2017-05-15-welcome-to-jekyll.markdown.erb’ does not have a valid date in the YAML front ma

So I tried to exclude vendor from as mentioned #2938:
And entered it like so in _config.yml:


  • Gemfile
  • Gemfile.lock
  • vendor

But I’m still receiving the same error. Any pointers?



I would start with the file in question: _posts/2017-05-15-welcome-to-jekyll.markdown.erb

Any particular reason it’s .erb and not .markdown or .md? I don’t believe Jekyll can read erb files, unless you’re using a plugin that adds that support.


Actually scratch that. Looks like you may have some files that Jekyll uses to build a jekyll new site. Sounds like from that error above you have a gems folder inside of your my-awesome-site directory.

If that’s the case then Jekyll is trying to read all those files and that’s your problem right there. I’d remove it or add it to your exclude if you have a valid reason for keeping it.