【问题标题】:Liquid Warning: Liquid syntax error :unexpected character when I jekyll serveLiquid 警告:Liquid 语法错误:当我 jekyll 服务时出现意外字符
【发布时间】:2016-09-25 16:00:06
【问题描述】:

【问题讨论】:

  • 除了使用屏幕截图外,请粘贴您的代码。节省输入答案。

标签: jekyll liquid


【解决方案1】:

Unexpected character &:

您想使用and 而不是&&

site.duoshuo_share and site.duoshuo_username

Unexpected character {:

错误实际上是您引用变量的方式。你不能使用这样的连字符,也不需要在{% %} 标签内使用{{ }}

假设它在 if 标签中:

{% if tag[1].size > site.featured_condition_size %}

或者:

{% if tag[1].size > site['featured-condition-size'] %}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多