avillafiorita/jekyll-datapage_gen

Pages will not generate if your _layouts directory has been changed/moved

lfracalossiFA opened this issue · 3 comments

I've inherited a Jekyll codebase where the _layouts directory has been moved to _config/_layouts using the layouts_dir: _config/_layouts parameter in config.yml. Without creating a new _layouts directory at the root of my site, the page generation will always fail at this step:

Error reading file /Users/lisefrac/jekyll_vanilla/_layouts/profile.html: No such file or directory @ rb_sysopen - /Users/lisefrac/jekyll_vanilla/_layouts/profile.html

I'm surprised the generator isn't querying the value of the layouts_dir parameter rather than the default site config, as I would expect that moving one's _layouts directory is a rather common use case.

(FWIW, I tested this both on a vanilla Jekyll 3.9.0 install, as well as my inherited codebase).

I'd rather not have to create two separate _layouts directory to get this plugin working. Nor do I feel confident enough in my Ruby skills to change the generator myself. Is there a way to fix this?

For now I am working around this using symlinks to _config/_layouts, but it would be nice if I didn't have to do this.

thanks for the report, it is certainly something to deal with in the next release (If I get it right, there is a specific Jekyll parameter the plugin should be looking at, rather than assuming layouts live in the _layouts dir).
thanks for reporting the issue.

Awesome, good to hear. Thanks for this plugin, btw! It took a little configuring, but it's making the work of creating a ton of pages much easier.