Request: Better feedback in messaging / nothing generated in blank directory #717

kevinSuttle opened this Issue Dec 29, 2012 · 9 comments


None yet
4 participants

Running jekyll in a blank directory: Nothing is actually generated, yet the message says it was.

☰  mkdir jekyll-test
☰  cd jekyll-test 
☰  jekyll
WARNING: Could not read configuration. Using defaults (and options).
    No such file or directory - /Users/kevinsuttle/Desktop/jekyll-test/_config.yml
Building site: /Users/kevinsuttle/Desktop/jekyll-test -> /Users/kevinsuttle/Desktop/jekyll-test/_site
Successfully generated site: /Users/kevinsuttle/Desktop/jekyll-test -> /Users/kevinsuttle/Desktop/jekyll-test/_site
☰  ls
./  ../

Also, WARNING: Could not read configuration. Using defaults (and options). isn't really helpful in that, there is no config to read from. This relates to another issue of generating nothing but the site, when first running the jekyll command. Would it be better to generate a config file since it's needed anyway, and let the user know that in the process?


parkr commented Dec 29, 2012

I foresee someone running jekyll by accident in other directories and getting _config.yml files all over the place. I could get behind a jekyll --init which wrote out a basic scaffold, but nothing automatic like this (especially if you're always using the defaults).

I would support a RuntimeError being thrown if Jekyll cannot find one's _layouts directory.

Agreed. One thing I'm seeing in the source files is that this kind of stuff should be prevented anyway (in theory at least).

And this scenario is missing in the feature spec also.

I think the tests fail because @path isn't null because there is no config file.

That's why we always get the 2nd stderr output, because it's not referencing @path.

It also doesn't help that the same warning is present for both no, and bad config files.

Doh. I wish I would have know you were working on this @parkr :p mojombo#726


tombell commented Jan 3, 2013

Technically the message is true, it generated an empty site :)

And I'm against throwing exceptions over a missing _layouts directory, they're not actually required.


parkr commented Jan 10, 2013

@tombell makes two good points. The only feasible way of doing this, which is probably not desirable, is to add a --helpful flag which throws errors and bugs the hell out of you until you fix things.

I don't think we're nearly that restricted. It's just a simple check. Don't generate the site, and tell me that I need at least an index.html file to generate a static site. Everything else is optional. No index.html, no site.

See my comments [1] [2] above and it doesn't look like this would take much.


parkr commented Jan 30, 2013

We're doing #791.

@parkr parkr closed this Jan 30, 2013

@jekyllbot jekyllbot locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.