2

When I run this in my command line:

$ bundle exec jekyll serve

I get this error:

Invalid date '': Document 'vendor/cache/gems/jekyll-3.3.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.

The front matter in the faulty file looks like this:

---
layout: post
title:  "Welcome to Jekyll!"
date:   <%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>
categories: jekyll update
---

I have updated my gems and installed Xcode. But I still get this error. I run this on: Macbook, macOS Sierra, 10.12.

Can you help?

Patrick
  • 21
  • 2

1 Answers1

4

I had same problem and I solved with this comment. Thank you @adeluccar

Solution

If you install gems with bundle using --path flag you need to exclude vendor file, so you just need to add vendor in the _config.yml file.

title: Lorem ipsum
author: Lorem
...
exclude:
  - Gemfile
  - Gemfile.lock
  - vendor