Jekyll:在主降价文件中包含降价文件作为变量 {{ include.variable }}

Jekyll: Including markdown files as variables to be {{ include.variable }} within the main markdown file

在 include 中包含 include 的原因是为了帮助希望编辑不熟悉 HTML 和 CSS 的新用户删除大多数 html。我已尝试包含两次,但存在语法错误。

原创-document.markdown

{% include template-document.markdown variable={% include To-add-document.markdown %} %}

模板-document.markdown

{{ include.variable }}

添加-document.markdown

**Filler markdown text etc.**

我不确定是否可以将 markdown 文件设置为变量,我在 Whosebug 上找到的替代方法是使用 。但是,我所有的价值观都是独一无二的,并且具有不同的价值观。当前的替代方案是生成更多具有内置值的降价文件或将 HTML 与 Markdown 结合使用。两者对用户来说都变得混乱。

是否可以将 markdown 文件包含为变量?

更新:

我设法通过使变量成为文件目录的字符串来解决它。

原创-document.markdown

{% include template-document.markdown variable="To-add-document.markdown" %}

模板-document.markdown

{% include {{ include.variable }} %}