之外我在杰奇的网站叫/patterns
一个目录,其结构通常一般是这样的:杰基尔:包括从目录中的文件_includes
_includes _layouts _site /patterns index.html
我需要保持/patterns
目录外_includes
原因很多,但主要是因为我需要将/patterns
中的文件放入iframe中以显示在模式库中)。
我想在我的Jekyll页面中包含来自/patterns
的文件,但使用{% include /patterns/file.html %} doesn't work as it points to the
_includes folder. How would I go about including a file from a directory that isn't
_includes`?
太棒了!如果我设置了这个选项,'/ patterns'仍然会编译并显示在'/ _site'中? –
如果你在'/ patterns'中放置了一个index.html,我相信! – Paul
嗯,这是当我将我的建议添加到我的'_config.yml'时:'LiquidException:包含的文件'_includes/patterns/file-name.html'not found'。 要清楚,我试图包含这样的文件:'{%include /patterns/file-name.html%}'也许我做错了吗? –