jekyll: Jekyll fails finding files
Jekyll config excerpt:
# Source dir
source: docs/icecast-2.4.1/
# Destination
destination: _standalone_docs
# Build settings
markdown: kramdown
permalink: /news/:title/
highlighter: pygments
# Markdown settings
# only change if you know what you are doing
kramdown:
header_offset: 2
auto_ids: false
defaults:
-
scope:
path: ""
values:
layout: "docs_standalone"
product: "Icecast"
Running jekyll build fails:
jekyll b --config _docs_config.yml
Configuration file: _docs_config.yml
Source: docs/icecast-2.4.1/
Destination: _standalone_docs
Generating...
Error reading file /Users/ePirat/Projekte/Icestuff/Website/_layouts/default.html: No such file or directory @ rb_sysopen - /Users/ePirat/Projekte/Icestuff/Website/docs/icecast-2.4.1/Users/ePirat/Projekte/Icestuff/Website/_layouts/default.html
Error reading file /Users/ePirat/Projekte/Icestuff/Website/_layouts/docs.html: No such file or directory @ rb_sysopen - /Users/ePirat/Projekte/Icestuff/Website/docs/icecast-2.4.1/Users/ePirat/Projekte/Icestuff/Website/_layouts/docs.html
Error reading file /Users/ePirat/Projekte/Icestuff/Website/_layouts/docs_standalone.html: No such file or directory @ rb_sysopen - /Users/ePirat/Projekte/Icestuff/Website/docs/icecast-2.4.1/Users/ePirat/Projekte/Icestuff/Website/_layouts/docs_standalone.html
Error reading file /Users/ePirat/Projekte/Icestuff/Website/_layouts/page.html: No such file or directory @ rb_sysopen - /Users/ePirat/Projekte/Icestuff/Website/docs/icecast-2.4.1/Users/ePirat/Projekte/Icestuff/Website/_layouts/page.html
Error reading file /Users/ePirat/Projekte/Icestuff/Website/_layouts/post.html: No such file or directory @ rb_sysopen - /Users/ePirat/Projekte/Icestuff/Website/docs/icecast-2.4.1/Users/ePirat/Projekte/Icestuff/Website/_layouts/post.html
done.
Auto-regeneration: disabled. Use --watch to enable.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 3
- Comments: 30 (14 by maintainers)
This is really ugly because there is no documentation or hint about having to put all folders into
source
. The error message with an incorrect path looks like a bug in Jekyll, not like it is on purpose. It doesn’t make sense that Jekyll actually finds the layout in<correct path>
which is outsidesource
but then tries to load it from<wrong path>
.So this should at least be documented in the configuration and provide a meaningful error message. It not expected, that (some of) the folder config settings are only relative to
source
.But I’d rather suggest to implement this as an optional feature. I don’t see why it should be enforced to have layouts and includes inside
source
folder. I’d like to separate them from the content but I don’t like needing an entire additional gem and repo for a Jekyll theme when I want to have one website in one place.It could also work with an additional config setting
content_dir
, sosource_dir
could be the enforced parent path but content can live in a dedicated source folder.We had no tests for them, because all the tests passed! Urgh.
Regardless of the reasons, the error message jekyll shows doesn’t make sense:
I’m currently trying to do a multi-site Jekyll build with some shared components (_sass, _layouts, etc.). I was going down the path of using plugins listed in the following blog post:
http://maximebf.com/blog/2013/07/multi-site-jekyll/ https://gist.github.com/maximebf/5992910#file-copy_assets-rb
However they failed to work giving me crazy long rb_sysopen failures where the entire path was appended to my base path again. I gave up on this and tried to roll my own. I was going to use symbolic links first and then try to write plugins to change the location of
_layouts
and such and ran into the exact same bizare thing!And that’s how I discovered this bug. 😃 Symbolic links don’t even seem to work, even with --safe off. @parkr What changed to require the entire source to be in the source directory? Is there a way to write a plugin to overwrite this and get back to the original functionality? Could you show me where in the code it is?
It also saddens me to read that, according to @mattr-, Jekyll once supported different locations for layouts and plugins in configuration, which would make multi-site a lot easier.
I find the case against this being shared components between multiple sites; for DRY principals. For plugins, the only away around this currently seems to be to turn them into gems. 😕