jekyll: unable to build a jekyll site … invalid date

when trying to build a jekyll site with “jekyll serve” I get this error:

Generating… ERROR: YOUR SITE COULD NOT BE BUILT: ------------------------------------ Invalid date ‘<%= Time.now.strftime(’%Y-%m-%d %H:%M:%S %z’) %>': Document ‘vendor/cache/gems/jekyll-3.2.1/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb’ does not have a valid date in the YAML front matter.

I used several jekyll templates to test, all with the same result, including the simple test template from the jekyll main page, i.e., “my-awesome-site”

  • I believe this to be a bug, not a question about using Jekyll.
  • I Updated to the latest Jekyll (or) if on Github Pages to the latest github-pages
  • I Read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
  • This is a feature request.

  • I am on (or have tested on) _macOS_ 10+
  • I am on (or have tested on) _Debian/Ubuntu_ GNU/Linux
  • I am on (or have tested on) _Fedora_ GNU/Linux
  • I am on (or have tested on) _Arch_ GNU/Linux
  • I am on (or have tested on) _Other_ GNU/Linux
  • I am on (or have tested on) _Windows_ 10+

  • I was trying to install.
  • There is a broken Plugin API.
  • I had an error on Github Pages, and I have not tested locally.
  • I had an error on Github Pages, and Github Support said it was a Jekyll Bug.
  • I had an error on Github Pages and I did not test it locally.
  • I was trying to build.
  • It was another bug.

My Reproduction Steps

The Output I Wanted

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 4
  • Comments: 24 (21 by maintainers)

Commits related to this issue

Most upvoted comments

I’ve solved it! It seems that you need to place the line exclude: [vendor] in _config.yml found this on the following issue: https://github.com/jekyll/jekyll/issues/2938

Just saying thank you, I ran into this error and this thread saved me hours

Yes

Thanks. I’ve done this.