Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jekyll missing post, page, and default

My goal is to build a website using Jekyll + Github Pages. I've ran into trouble already where I had to upgrade my Mac from Mountain Lion to Mavericks just so I could install Xcode and RedCloth.

I'm trying to use Github Pages's official documentation, but it's been trouble as mentioned above. I'm at the point where I'm trying to run bundle exec jekyll serve

but I have received errors stating that there was no date like so:

ERROR: YOUR SITE COULD NOT BE BUILT:
                ------------------------------------
                Invalid date '0000-00-00': Post '/vendor/bundle/ruby/2.0.0/gems/jekyll-  2.4.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the filename.

So I went in and put in today's date. The next error was

 ERROR: YOUR SITE COULD NOT BE BUILT:
                ------------------------------------
                Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S') %>': Post '/vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/_posts/2014-10-08-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.

So I went into the welcome-to-jekyll file and put in today's date and time.

I tried to run the server again. The next issue which I now cannot get around is several files appear to be missing:

Build Warning: Layout 'post' requested in vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/_posts/2014-10-08-welcome-to-jekyll.markdown.erb does not exist.
 Build Warning: Layout 'page' requested in vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/about.md does not exist.
 Build Warning: Layout 'default' requested in vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/index.html does not exist.
Conversion error: Jekyll::Converters::Scss encountered an error converting 'vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/css/main.scss'.

Googling the issue has not brought any answers. From my understanding, this was supposed to be a straight forward process, but it's been a disaster the whole way!

like image 215
user3753138 Avatar asked Oct 08 '14 15:10

user3753138


2 Answers

Did you by chance install your gems to vendor/bundle? I was getting the same error and this issue on the Jekyll github project fixed it for me https://github.com/jekyll/jekyll/issues/2938

like image 108
LupineDev Avatar answered Oct 01 '22 22:10

LupineDev


It seems that you are not in the good place to work. You are working in the site template, used by Jekyll to generate new site. Don't touch this.

Instead, work in a new folder, eg: user/www/mysite

Once in this folder just do a jekyll new .

You can now do a jekyll serve or bundle exec jekyll serve it will work.

like image 21
David Jacquel Avatar answered Oct 01 '22 22:10

David Jacquel