【问题标题】:Getting Include parameters to work in Octopress/Jekyll获取包含参数以在 Octopress/Jekyll 中工作
【发布时间】:2014-07-21 23:16:39
【问题描述】:

我使用的是 Octopress 2.0,并且在设置包含时似乎无法使参数正常工作。

我基本上是在尝试做:

{% include foo.html bar="Hello World" %}

加载页面时出现此错误:包含文件'foo.html bar="Hello World"'包含无效字符或序列

根据 Jekyll 文档,这应该可行,对吧?

【问题讨论】:

  • 一些代码给我们看?

标签: jekyll liquid octopress


【解决方案1】:

include 指令没问题,不会产生错误。

{% include foo.html bar="Hello World" %}

在 _includes/foo.html 中查找错误或发送代码以进行进一步调查。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-05-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多