2015-06-11 35 views
1

我想包括在根目錄中的某個標記文件轉換爲子目錄中的另一個文件。Jekyll:子目錄中使用的液體標籤

我嘗試了許多不同的語法:

{% include_relative ../root/file %} 
{% include_relative /../root/file %} 
{% include_relative ./../root/file %} 
{% include_relative /./../root/file %} 
(and others) 

有沒有辦法回去使用液體標籤傑基爾中的父目錄?

回答

2

jekyll documentation

例如,如果_posts/2014-09-03-my-file.markdown使用 include_relative標籤,所包含的文件必須是_posts 目錄內,或它的一個子目錄。您不能在 其他位置包含文件。