简体   繁体   中英

Liquid Warning: Liquid syntax error :unexpected character when I jekyll serve

the error happened when I enter jekyll serve

在此处输入图片说明

Unexpected character & :

You want to use and rather than && .

site.duoshuo_share and site.duoshuo_username

Unexpected character { :

The error is actually the way you are referring to a variable. You can't use hyphens like that and you dont need to use {{ }} inside a {% %} tag.

Assuming it's in an if tag:

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

Or:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM